0

I assumed that if a user was in a group, it would have access to the files associated with it, e.g.

drwxrwxr-x 9 bitnami rootandbooly    4096 Jan 10 16:31 htdocs

boolyXXX@XXXX:/opt/bitnami/apps/wordpress$ members rootandbooly
root boolyXXX daemon bitnami

I had thought if the a user was in rootandbooly that it would be able to edit files via FTP. In fact, I am seeing it cannot.

In my application as above, I have no FTP edits but wordpress plugins work.

Attempting to edit via FTP yields:

enter image description here

Permission denied.
Error code: 3
Error message from server: Permission denied

Changing owner to boolyXXX

sudo chown -R boolyXXX:rootandbooly /opt/bitnami/apps/wordpress/htdocs

boolyXXX was already in the group but I can now edit files via SFTP. Unfortunately, wordpress plugins do not get installed as it needs owner bitnami.

So I have a wordpress server where either I can set a user so I can SFTP but not use wordpress or not SFTP but use wordpress.

Does anyone know if Groups are meant to have access to files and why I cannot do SFTP edits via a user in the group I set up?

SeanJ
  • 381
  • 1
  • 5
  • 15
  • 1
    Groups can own files and the members can then access those files! Please check the permissions given to that group and when the user was added to the group did you log out and in again to have the changes take effect? – George Udosen Jan 10 '19 at 21:50
  • @GeorgeUdosen how do I check the permissions of a group and can I assign 775 to the group? FWIW, I tried logging out and rebooting. – SeanJ Jan 10 '19 at 22:22
  • 1
    The commands is sudo chmod -R 775 /path/to/folder! – George Udosen Jan 10 '19 at 22:50
  • @GeorgeUdosen my (flawed?) understanding was that sudo chmod -R 775 /path/to/folder was assigning those permissions to the ower, i.e. boolyXXX and the group did not necessarily have the same permissions. – SeanJ Jan 11 '19 at 00:12
  • 1
    775 here means 7 for owner, 7 for group and 5 for others! – George Udosen Jan 11 '19 at 05:37
  • @GeorgeUdosen Never was something so confusing explained so simply! The cloud of ignorance has lifted. Thank you Mr Udosen! I misinterpreted the error too, the write works but the owner remained the same hence warning. I can live with that. – SeanJ Jan 11 '19 at 09:51
  • 4
    Here is one possible solution of this task: Setting up SFTP to log in to server with Filezilla Also, in my answer there are listed links to other possible solutions. – pa4080 Jan 14 '19 at 07:33
  • 1
    I think you must set chmod g+s for /path/to/folder and the sub directories inside: sudo find /path/to/folder -type d -exec chmod g+s {} +. – pa4080 Jan 14 '19 at 07:38

0 Answers0