quick one--umaske for 777?

Jeff Vian jvian10 at charter.net
Sat Jan 29 00:56:17 UTC 2005


On Fri, 2005-01-28 at 18:15 -0500, Joe Szilagyi wrote:
> Hi,
> 
> I'm having a brain lapse and can't find the right one off Google--what's the
> umask value to set in my FTP conf file to have final uploaded files *arrive*
> with a chmod of 777?
> 

AFAIK this can't be done.

Umask of 000 would theoretically produce what you want, but linux
refuses to create files that are executable for security reasons.  The
best it will allow is 666 on the files uploaded.  A quick proof of that
would be to set your own umask to 000 then create a new file and look at
the permissions.

Allowing uploaded files to have mode 777 with a public FTP site would be
one of the worst mistakes I can think of because it would allow anyone
to put an executable file in your ftp site that could be then executed
for the creators purpose, what ever that may be (and usually not for
your benefit)

> Bad security, I know, but its for a project... thanks.
> 

It may be possible to have ftp run a script when the upload completes to
set the mode, or to modify the program itself to do that, or to have
cron reset the mode on all files periodically.

> Regards,
> Joe
> 
> 
> 
> 




More information about the users mailing list