Ftp permission 644

On Sun Solaris 8 I would like a user to post via FTP a file with a put command with higher permission than the standard 644. For instance 664.
I don't know how to perform it.

Thank you in advance.

Sounds like a job for umask!

On the unix side check the umask value either in the user's home directory inside the .profile or the /etc/profile that is the default if there is no umask defined in the user's .profile.

Remember, the umask is the opposite of permissions, if you want 644 then the umask is set to typically 022. You cannot set executable permissions with umask.

Try this and get back to me.

:smiley:

I've already tried to do it ....
I inserted such a row in .profile file (umask 002) of the user and this user now creates files with 664 permission but when this user puts a new file via ftp it still has 644 permission.
Very interesting!!

Thank you very much.
Dan

You can set UMASK=nnn in your /etc/defaults/ftpd (On Solaris)
(You must be root to change this file/create it if it doesn't exist).

On HP-UX and AIX you can use the following command and it should change your umask for the session.

site umask <nnn>

Give that a try. Hope it works for you.

It works with Solaris.
You're really great!

Thank you very very much.

Dan

:slight_smile: :slight_smile: