SUMMARY: FTP and File Permissions

From: <John.Maguire_at_PSIR.ie>
Date: Mon Oct 08 2001 - 11:38:10 EDT
Original question was how to set the permissions on a file once ftp'd to a
target system using the default ftpd in Solaris.
 
I got several responses but Casper hit the nail on the head in suggesting I
use default ACL on the directory. 
 
Other suggestions included
- quote site umask 117 (my version of ftp didnt support this)
- create /etc/default/ftpd with an entry -f umask=117 (didnt try this so I
cant confirm if it works)
- ftp -p which apparently keeps permissions (again, my version doesnt
support this)
- use wu-ftpd and modify the ftpaccess file
- chmod command (my ftpd doesnt support it)
 
Thanks go (in no particular order) to
 
Rasmussen Thorfinn
Casper Dik
William Bochnik
Steve Holdoway
Blaine Owens
Lorraine Coombes
Lincoln Nelson
Craig Russell
Edward Scown
Dan Lowe
 
Thanks,
John
 
 
ORIGINAL QUESTION

seen this asked a few times in the archives but I havn't seen an answer yet.
A search on google proved fruitless. 

I'm trying to ftp a file, for a particular user, to a target system so that
the permissions on the target system are rw- rw- ---.

However, the file, once ftp'd is written to the target as rw- r-- r--. 

I've tried changing the umask of the local and remote user to 117, but to no
avail. 

The following suggestion is made on SunSolve: 

1) First save the original in.ftpd 

       mv /usr/sbin/in.ftpd /usr/sbin/in.ftpd.orig 

2) Create the script so that its contents look like: 

       #!/bin/sh 
       umask 022 
       exec /usr/sbin/in.ftpd.orig 

3) Make sure the script is executable: 

       chmod 755 /usr/sbin/in.ftpd 

Now all files created via FTP will have mode 0644. 



But this will set the file permissions on a system-wide basis, which is not
what I want. 

Does anyone know if this is possible or am I missing something here? 

BTW, I'm using the Sun-supplied ftpd. A third-party ftpd is not an option
for me, nor is a fancy GUI that allows you to set permissions.

Thanks, 
John 




********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please 
notify us immediately at MailManager@psir.ie and delete this E-mail 
from your system. Thank you.
It is possible for data transmitted by email to be deliberately or
accidentally corrupted or intercepted. For this reason, where the
communication is by email, the Bank of Ireland Group does not accept 
any responsibility for any breach of confidence which may arise 
through the use of this medium.
This footnote also confirms that this email message has been swept 
 for the presence of known computer viruses.
********************************************************************
  

_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Mon Oct 8 10:34:05 2001

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:26 EST