LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 01-07-2010, 04:59 AM   #1
mufy
Member
 
Registered: Oct 2004
Location: Kuwait
Distribution: Currently - AIX | Previously - RHEL 4 ES, FC 10
Posts: 206
Blog Entries: 4

Rep: Reputation: 30
File transferred by FTP not taking UMASK settings.


Hi,

UMASK value of an ftp account, TSTFTP, on the destination machine is:

Code:
$ id
uid=231(TSTFTP) gid=14(dba) groups=1(staff)
$ umask
06
File created as TSTFTP user has the following permissions:
Code:
$ touch test.txt
$ ls -ltr | grep test.txt
-rw-rw----   1 TSTFTP   dba               0 Jan 07 13:50 test.txt
But when I ftp a file as TSTFTP, say, ftp.txt from another machine with the following permissions:

Code:
$ls -ltr ftp.txt
-rw-rw-rw-   1 op58     system            0 Jan 07 13:37 ftp.txt
When it reaches the destination, it has the permission as follows eved though the UMASK is 006 as stated above:
Code:
$ ls -ltr ftp.txt 
-rw-r-----   1 TSTFTP   dba               0 Jan 07 13:56 ftp.txt
Can someone explain as to why this is happening?
 
Old 01-07-2010, 06:42 AM   #2
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
what FTP program are you using? I know in vsftpd there is a local_umask setting. Perhaps you have the same and it take precedence.
 
Old 01-07-2010, 08:39 AM   #3
mufy
Member
 
Registered: Oct 2004
Location: Kuwait
Distribution: Currently - AIX | Previously - RHEL 4 ES, FC 10
Posts: 206

Original Poster
Blog Entries: 4

Rep: Reputation: 30
That's what I figured too when I searched online. Both the boxes use the nattive FTP program in the OS (AIX). I am lost as to where this order of precedence is coming from, if that is what the issue is.
 
Old 01-07-2010, 11:43 AM   #4
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
I no longer have access to AIX server to place with, however, this looks like the answer to me: http://publib.boulder.ibm.com/infoce...cmds2/ftpd.htm

Search for "-u OctalVal" - that seems to set the umask value.
 
Old 01-09-2010, 11:20 PM   #5
mufy
Member
 
Registered: Oct 2004
Location: Kuwait
Distribution: Currently - AIX | Previously - RHEL 4 ES, FC 10
Posts: 206

Original Poster
Blog Entries: 4

Rep: Reputation: 30
Thanks to zQUEz's directing me to the relevant resource I was able to resolve the issue.

FTP daemon, by default, has a UMASK value of 027 which gives the files FTPd a permission of rw-r-----. To have this changed to rw-rw----, the following entry in /etc/inet.conf:

Code:
ftp   stream  tcp6    nowait  root    /usr/sbin/ftpd  /usr/sbin/ftpd -l -d
was changed as:
Code:
ftp  stream tcp6  nowait root  /usr/sbin/ftpd  /usr/sbin/ftpd -l -d -u 007
Once that was done, the inetd daemon was refreshed thus:
Code:
refresh -s inetd
 
Old 05-22-2014, 05:59 AM   #6
ktmariappan
LQ Newbie
 
Registered: Mar 2011
Posts: 6

Rep: Reputation: 1
Thumbs up setting umask value for ftp in redhat

Here ftp's(anonymous) default file permission is,after upload 700(777-077=700). You may wish to change this to 744,Please add below entry to /etc/vsftpd/vsftpd.conf file

anon_umask=033



After changes you should get below permission
drwxr--r-- 2 14 50 4096 May 22 10:40 Thangamariappan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] umask change not taking effect mufy AIX 2 01-09-2010 11:39 PM
[SOLVED] umask change not taking effect mufy Linux - Newbie 3 01-09-2010 11:37 PM
umask taking the nearest even number anjanesh Linux - General 4 07-17-2006 12:12 PM
vsftpd umask settings fluffyvoidbunny Linux - Software 2 02-07-2006 03:06 PM
Umask - Settings XaViaR Linux - General 2 09-28-2005 06:24 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 11:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration