1833787 Members
2459 Online
110063 Solutions
New Discussion

FTP and permissions

 
SOLVED
Go to solution
Rick Barr_1
Occasional Contributor

FTP and permissions

How can I set the permissions that will set all files being ftp'ed into a specific directory to 666. I have tried to set a umask within the .profile but that did not do it. I know that coming from anther UNIX box I can do it on the ftp command line but that is not the case here. Is there some file within the ftp tree that will allow this?
rbarr
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: FTP and permissions

Hi Rick:

Have a look at the man pages for 'ftpaccess(4)'.

Regards!

...JRF...
Yogeeraj_1
Honored Contributor
Solution

Re: FTP and permissions

hi,
to add to the above reply..

You need to alter the ftp daemon definition, for this you need to change the line in /etc/inetd.conf
from:

[example]

ftp stream tcp nowait root /etc/ftpd ftpd -l
to:
ftp stream tcp nowait root /etc/ftpd ftpd -l -u002



see: http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xde9d3a1c04ffd61190050090279cd0f9,00.html

for more info.


You .profile settings will NOT affect the FTPD.

hope this helps!

Best Regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Steven E. Protter
Exalted Contributor

Re: FTP and permissions

slight elaboration on JRF's post.

in ftpaccess you can set umask, just like you can for file creation from a Unix shell.

You can not however set up files to be executable(if my pea brain molecules are correct).

Also explore chroot() configuration. This makes the default login directly appear to be the root. It prevents ftp users from exploring your system and dropping files all over the place.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com