0

TLDR: I cannot access a folder even though I am part of the group and the group should have access to it.

So i installed a new service and it created a new folder inside /media called "ftphome".

I then setup the ownership and permissions of this folder by running:

sudo chown -R ftp:ftp /media/ftphome
sudo chmod -R u+rwxs,g+rwxs,o-rwx /media/ftphome

I then added my primary acct to the ftp group.

sudo usermod -a -G ftp tony

Looking at /etc/group, the last entry is

ftp:x:118:tony

But my problem is that when I try to do a simple command like

ls -la /media/ftphome

I get an error message that says I don't have the necessary permission. I thought adding my acct to the group should've fixed that?

As a test, I created a new folder in /media called "test" and run the same chown/chmod commands from above and I still don't have access to this test folder.

Any ideas what I have done wrong?

Thanks

3
  • The user doesn't have permissions to access the parent directory (/media)? Might be best to create a directory that needs to be shared inside /home).
    – rkhff
    Jun 25, 2017 at 14:40
  • What does command groups say? users don't actually inherit the new group membership until a new login shell is started Jun 25, 2017 at 14:48
  • you have to write ls /media/ftphone/ to see what is in the folder---note the trailing /. with out the / asks for the information on the folder, which you don't have permission to access.
    – ravery
    Jun 25, 2017 at 14:51

0

You must log in to answer this question.

Browse other questions tagged .