FTP 'put' file permissions

FTP 'put' file permissions

Post by Kevin McCarth » Fri, 22 Dec 1995 04:00:00



I'm trying to configure the permissions of a file put on a Solaris 2.4
machine through FTP.  

All the files I'm uploading on the machine through FTP have permissions
-rw-rw-rw-.  I would like to change this 'default' value or have it read
the umask in /etc/profile.

Is there any way to configure this?

Thanks

Kevin McCarthy

 
 
 

FTP 'put' file permissions

Post by Casper H.S. D » Sat, 23 Dec 1995 04:00:00



>I'm trying to configure the permissions of a file put on a Solaris 2.4
>machine through FTP.  
>All the files I'm uploading on the machine through FTP have permissions
>-rw-rw-rw-.  I would like to change this 'default' value or have it read
>the umask in /etc/profile.

Not really, but you can try:

The solaris FAQ says:

3.48) How can I prevent daemons from creating mode 666 files?

    By default, all daemons inherit the umask 0 from init.
    This is most problematic for a service like ftp, which in a
    standard configuration leaves all uploaded files with mode 666.

    To get daemons to use another umask execute the following
    commands in /bin/sh and reboot:

    umask 022  # make sure umask.sh gets created with the proper mode
    echo "umask 022" > /etc/init.d/umask.sh
    for d in /etc/rc?.d
    do
        ln /etc/init.d/umask.sh $d/S00umask.sh
    done

    Note: the trailing ".sh" of the scriptname is important, if
    you don't specify it, the script will will be executed in a
    sub-shell, not in the main shell that executes all other scripts.

    --- end of excerpt from the FAQ

Questions marked with a * or + have been changed or added since
the FAQ was last posted

The most recently posted version of the FAQ is available from
ftp.fwi.uva.nl in directory /pub/solaris
--
Casper Dik - Network Security Engineer - Sun Microsystems
This article is posted from my guest account at the University

Opinions expressed here are mine (but you're welcome to share them with me)

 
 
 

1. in ftp, put put *`date '+%Y%m%d'` doesn't work

In ftp I want to put a file from that ends in the current yyyymmdd.  eg.
filename_20000119 would be a the filename I want to put as it has the
current date (when I wrote this message) Using the following doesn't
work, any ideas?

put *_`date '+%Y%m%d'`

2. mod_perl

3. SB16 low volume level

4. Netscape and backspace key - how?

5. Slow FTP 'gets', Fast 'puts'???

6. procmail usage

7. FTP: logging things other than 'get' and 'put'

8. 'put' files from unix to VMS via batch ftp.

9. FTP file transfer slow with 'put' command

10. Ftp 'put' files are mode 666

11. Shell to ftp 'put' a file?