Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set default file permissions during FTP

Status
Not open for further replies.

yuroy

Technical User
Aug 26, 2001
18
SG
Hi,
How do I set the default permission of a file after FTP without manually executing chmod. Like I would like to set a umask of 022 for all files that I FTP. Is there a profile that does this? I tried /etc/profile, but it didn't work.

Thanks in advance for the help.
 
On the ftp prompt you can change umask with the
site umask command.

ftp> site umask 022
200 UMASK set to 022 (was 027)

Itdj
 
Hi,

Thanks for the help. I forgot to mention that I'm runnign FTP from Win/NT to AIX, and the 'site umask' command doesn't work from Windows to AIX.
An option I did was modifying the ftpd entry in /etc/inetd.conf to add a parameter -u for umask. But this means that this option is applicable to all users running FTP. I'm still trying to figure out how to set it for specific users.
 
How about using a .netrc command file.
It will reside in each user's home dir.
So the scripts you use to ftp can have all
kinds of rights/instructions that other users can't have.

HTH Dickie Bird (:)-)))
 

Why doesn't the site umask work from Win to AIX??

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Hi!

Morsing:
The site command does not exist in windows ftp command!

yuroy:
Any luck yet without changing inetd.conf?
I have run into the same problem!
 
You will have to use the quote or literal commands within the windows ftp to send the string, eg:

ftp> quote site umask 022
200 UMASK set to 022 (was 027)
 
Hi sectorseveng,
Thanks. this works.

Thanks also to the others for their suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top