Visit Our UNIX and Linux User Community

Default umask setting during ftp AIX

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Default umask setting during ftp AIX
# 1  
Old 07-28-2014
Wrench Default umask setting during ftp AIX


I have set below option in following file /etc/inetd.conf in AIX.

ftp     stream  tcp6    nowait  root    /usr/sbin/ftpd  ftpd -u 2

But still it created the file with permission (640):

-rw-r-----    1 ftptosas ftpusrg        6091 Jul 28 12:23 diff_061920.txt

Required permission :

-rwxr-x---    1 ftptosas ftpusrg        6091 Jul 28 12:23 diff_061920.txt

Please let me know whether we need to restart the unix daemon after setting above permission.

Thanks & Regards,

Last edited by Don Cragun; 07-28-2014 at 08:19 PM.. Reason: Add CODE tags (and remove extraneous -).
# 2  
Old 07-29-2014
This may be considered illegal and ignored (assuming that your FTP process doesn't set the permissions itself)

You should really try ftp -u 002 to be clear.

Setting the umask value for ftpd will also not set the file executable. I think it is always considered as a transfer for data. If you need this, then consider something like:-
ftp -nv $target <<-EOFTP
   user $user $password
   cd /target/dir
   put sourcefile targetfile
   site chmod 750 targetfile

It would be a little odd (but not illegal) to have a .txt file set as executable.

I hope that this helps,

Previous Thread | Next Thread
Test Your Knowledge in Computers #160
Difficulty: Easy
The Internet Autonomous Network Authority (IANA) is responsible for maintaining the official assignments of Internet port numbers.
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Setting default permissions without umask or cron jobs

I've got a number of people sending files to me in different directory structures, and users on many different groups who need access to these incoming paths. My problem is that umask assumes a default of 666 for files. No execute bit, meaning that my users can't even see the incoming folders.... (2 Replies)
Discussion started by: Karunamon
2 Replies

2. UNIX for Dummies Questions & Answers

Setting umask 022 by default to my profile

Hello everyone, I want to set my properties of my profile to umask 022 by default. I have an idea that i need to make the change in .profile file. Can you please help me, on how would i be able to set it. Thanks, Abhishek S. (4 Replies)
Discussion started by: abhisheksunkari
4 Replies

3. AIX

default umask setting during ftp

Hi all, How do i change the default primary group of files uploaded in AIX (via ftp) in such a way that the files will be owned by tom:staff? I understand that the default file permission can be set in /etc/profile for aix by adding a new line umask=032 Do I add a line in umask as well?... (5 Replies)
Discussion started by: chipahoys
5 Replies

4. UNIX for Dummies Questions & Answers

UMASK setting

How can we set the Sticky bit in the umask itself. Please help me :confused: I tried to set like umask 1000 but when I run umask, the value of umask is 00 (0 Replies)
Discussion started by: geniman2004
0 Replies

5. HP-UX

umask for an ftp account

Hi, I have an ftp account which is used for transferring files to a UNIX box. eventhough the permissions on the source box for the files are 777, when it reaches the destination node via this ftp transfer the permissions is getting changed to -rw-r----- can someone please help me? umask... (3 Replies)
Discussion started by: vivek_damodaran
3 Replies

6. Shell Programming and Scripting

umask setting

dear all, i'm trying to set the default permission using umask commnd. i'm using bash shell and the permission of the .bash_profile file is -rwxr-x--- 1 tdmscrdr dba 370 Nov 7 12:21 .bash_profile but still i'm not able to change the default permissiom. in the .bash_profile... (1 Reply)
Discussion started by: panknil
1 Replies

7. Linux

setting daemon umask

I was asked to change the daemon umask on my RHEL4 machine. so, i changed the /etc/init.d/functions file. Does this take effect right away? I dont think it does, how can i get it to take affect without rebooting? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

8. AIX

umask setting on a logon script

hi, am new to AIX. i have an issue. iam asked to change the umask setting on a logon script on a server to prevent writable files. i logged in as the root user and typed in umask and it displays 022, which i believe is 755 for direc and 644 for files. 1) how to I identify where the logon script... (2 Replies)
Discussion started by: karthikosu
2 Replies

9. UNIX for Advanced & Expert Users

setting umask in FreeBSD 5.4

Hi, I need to change my umask from 22 to 0022. FreeBSD 5.4 has different way of looking at 22 and 0022. Untill 4.11 stable 022 and 0022 were same. Can anyone help me? Thanks in advance. Jimmy (0 Replies)
Discussion started by: jimmynath
0 Replies

Featured Tech Videos