FTP User cannot modify files but has correct permissions

Posted by Lothar_Grimpsenbacher on Server Fault See other posts from Server Fault or by Lothar_Grimpsenbacher
Published on 2012-11-17T04:32:36Z Indexed on 2012/11/17 5:03 UTC
Read the original article Hit count: 403

Filed under:
|
|
|

I have created a new user (foo) and when he logs in via ftp he cannot edit the files in the directory to which he has access.

In the directory he can log into ls -l gives me:

-rw-rw-r-- 1 root www-pub  6427 Nov 17 04:21 index.html

The user belongs to the group www-pub. Here is the output of cat /etc/group to demonstrate that he is indeed in that group:

...
www-pub:x:1001:ftpuser,www-data,foo
foo:x:1002:

*edit the permissions on the containing directory are:

drwxrwsr-x  5 root www-pub  4096 Nov 17 02:53 thecontainingdir

and the one above that:

drwxrwsr-x 49 root www-pub  4096 Nov 16 02:40 thenextdirup

So since he can log in via ftp and since the file he needs to edit has the correct permissions to let the group www-pub read and write the file and he is a member of that group, why can't he edit it (or upload anything)?

Only when I change the file to 777 can he edit it. It's as if he's NOT in the group... but he is! What's going on?

© Server Fault or respective owner

Related posts about linux

Related posts about permissions