FTP not working with folder permissions

116 views
Skip to first unread message

Marc Schubert

unread,
Aug 15, 2013, 8:01:40 PM8/15/13
to
Hi,
 
I have a photocopier that I want to scan to my DNS-323 (via FTP), and I want to be able to access the scans (via SMB)
 
So I've created a user called "scanner" which is a member of the "users" group. This created a folder called "scanner" and I've set the permissions on that folder to:
rwxrwx---
Because I want the "scanner" user to read, write, and execute and I want other users in the "users" group to be able to read, write and execute (via SMB), but I don't want anyone else having access.
 
I then enabled FTP, and enabled: "Restrict Folders", "Writeable folders", and disallowed all other users except "scanner".
 
I am able to upload and download files to the scanner folder using the scanner user (via FTP), and I'm able to browse the folder with other users using SMB. However I'm not able to open or delete/modify files with the other users... I get an "Access Denied" error.
 
When I look at the files I've uploaded (in Filezilla) and look at the permissions.... I see: -rw-------
I see the same permissions for the FTP uploaded file when I SSH in and do a ls -l in my /home/scanner directory.
 
How can I configure things so that any file that is uploaded to the "scanner" folder (via FTP) inherits the folder permissions of: rwxrwx---???
 
Thank you.

Marc Schubert

unread,
Aug 17, 2013, 12:19:44 PM8/17/13
to al...@googlegroups.com
No ideas?

Is there a config file I can modify to specify the permissions that are assigned to files uploaded via FTP?

I know with the old D-Link firmware you could have this functionality. You could specify a folder to use with FTP and you can assign other users rwx permissions to that folder...

Marc Schubert

unread,
Aug 17, 2013, 4:29:56 PM8/17/13
to al...@googlegroups.com
Forgot to mention that I tried going to Folder Ownership and Access Permissions for the "scanner" folder and checked "Apply also to files" and that didn't work. Furthermore, I noticed once I went back to that configuration page that the "Apply also to files" option was automatically unchecked, even though I had checked it and clicked "Submit"... Not sure if that's a bug??

João Cardoso

unread,
Aug 17, 2013, 4:59:21 PM8/17/13
to al...@googlegroups.com


On Saturday, August 17, 2013 5:19:44 PM UTC+1, Marc Schubert wrote:
No ideas?

Is there a config file I can modify to specify the permissions that are assigned to files uploaded via FTP?

From the vsftpd.conf manual page 

       local_umask
              The  value  that  the umask for file creation is set to for local
              users. NOTE! If you want to specify octal  values,  remember  the
              "0" prefix otherwise the value will be treated as a base 10 inte-
              ger!

              Default: 077

so you might want to se it to 007 ;-)

You  might  also be interested in

       file_open_mode
              The permissions with which uploaded files are created. Umasks are
              applied  on  top of this value. You may wish to change to 0777 if
              you want uploaded files to be executable.

              Default: 0666 

Marc Schubert

unread,
Aug 19, 2013, 4:03:41 PM8/19/13
to al...@googlegroups.com
Thank you for the reply. The UMASK ended up being exactly what I needed. Although it was a bit of a learning curve figuring out how to set the umask...
Reply all
Reply to author
Forward
0 new messages