ICE

TCP/IP Products => TCP-PRO => Topic started by: gmish on July 27, 2005, 01:07:31 pm

Title: umask in a script
Post by: gmish on July 27, 2005, 01:07:31 pm
How do I change the umask in a script that I use when scripting an ftp transfer?
Title: Re:umask in a script
Post by: jimn on July 27, 2005, 01:29:53 pm
Unfortunately, you cannot change the umask in a script.

Sorry
Jim
Title: umask in a script
Post by: gmish on July 27, 2005, 01:38:40 pm
So how would I do this:

Need to send a file over to our unix server (using an ftp script) and I want this file to be available to all users.

Is there a way to set the umask for the ftp-win to always be 000?  If I do a manual ftp using ftp-win I can change the umask, but it always defaults back to 022.  I'd like it to always be 000 instead of 022.
Title: umask in a script
Post by: Bob on July 28, 2005, 09:32:49 am
You change it on the server which is where ftpwin gets it from. If you are using SCO, the file to change is /etc/ftpaccess. You can do a man ftpaccess to find out about the value to set which is defumask. It can be set in a class by class basis or globally. To set it globally, put the following line in /etc/ftpaccess:

defumask 0000