Having done ftp from a PC to a unix box,i.e. "put" from PC (local) to unix (remote), the file's access permissions are rw- (owner), r-- (group) and --- (other). Is there any way within the ftp session I can change these?
No, you can't change the file permissions via ftp. These permissions are controlled by the value of umask.
I can't remember where this is set for files created via ftp, but it could be in /etc/profile. Someone else should be along shortly who will know this.
Yes, umask is what controls file permissions for copied files but not the user's umask. The ftp daemon's umask is what you need to alter.......
In AIX:
/etc/inet.inf file contains a list of subsystems to start at startup by the inet daemon. ftp is one listed here.
You have to add a switch to the ftpd command ( example: ftpd -u 022) at the end of the line where it is defined. Then, stopsrc -t ftp to bring down ftp and, startsrc -t ftp to bring it back up. thats' it !!
Hi,
I have a similar problem. I want to upload a file to my server from Windows. I have the userid/pwd. I want to automate the process. Something like, i will click on a batch file which should ask me for a password. When i supply a valid password it should upload the file. The file name and the source directory are assumed to be non changing and fixed and known.Is such a thing possible???
I achieved until this:I created a batch file. In that only i have hardcoded username and pwd.
ftpBatch.bat
=============
cd c:
ftp -s:%0
goto done
open xxx.xxx.xxx.xxx(IP add)
user
pwd
cd DESTINATION_DIR
mput file1.txt
y
bye
:done
========================
Instead of hardcoding i want it to be atleast a command line parameter which can be run using:
C:\> ftpBatch.bat pwd
Any inputs will be highly appriciated....
Thanks and Regards,
Srinath Thanks and Warm Regards,
Srinath M.K
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.