Help with default permissions


 
Thread Tools Search this Thread
Operating Systems AIX Help with default permissions
# 1  
Old 04-20-2010
Help with default permissions

I have a user who logs in to a remote system to put files via FTP. When they log in, the permissions on the files are rw-r--r--. How can I get these permissions to be set to rw-rw-r--?

I set the umask for the user profile, but that only works when they log in via telnet or ssh. Not FTP.
# 2  
Old 04-20-2010
# 3  
Old 04-21-2010
The issue with changing that is that it affects the entire box and all files transferred via ftp. I don't want this. I want it specific to a single user.
# 4  
Old 04-21-2010
ma be some simple script putting in crontab will do the job
Code:
cd /home/user/
while true
do
numberoffiles=`ls |wc -l`


sleep 30
echo "comparing number of added files"
if [[ "$numberoffiles"  -lt  `ls|wc -l` ]]
then chmod 700 *
echo "chmoding files with 700 permission"
else
echo "file number not modified"
fi
done


:-)
# 5  
Old 04-21-2010
This won't work for my particular situation.

Thanks for the info though.
# 6  
Old 04-21-2010
According to AIX 5.2 ftpd manpage you can specify a default umask with the "-u" option, however it will affect all users that connect through FTP.

Code:
-u OctalVal 	 
           Sets the ftpd daemon's umask. The OctalVal variable must be specified as an octal value to define the umask. The default umask is an octal value of 027, which results in file permissions of rw-r-----.

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

How to restore standard default permissions on /etc?

Hello HP Admins, Somehow Permissions of files inside /etc set to 777 in HP-UX 11. Due to this, system malfunctioning. I would like to know if there exists any command/script that sets all system files (or /etc atleast) to its default standard permissions. I just don't want to run 755 on /etc... (3 Replies)
Discussion started by: prvnrk
3 Replies

2. Linux

Default user:group permissions while creating files and directories

Hi, I am working on setup a environment where only a specific user can upload the builds on htdocs of apache. Now i want that a specific user can copy the builds on htdocs folder. I created a group "deploy" and assign user1 and user2 to this group. On Apache side i mentioned User=deploy... (3 Replies)
Discussion started by: sunnysthakur
3 Replies

3. 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

4. UNIX for Dummies Questions & Answers

Setting default directory file permissions and ownership help

I'm trying to setup a directory structure for my staff which enables them full access to files in the directories with their name, and have access to anything in the shared directory. The directory structure looks like this: root@www10 # ls -l total 56 drwxr-xr-x 7 internal internal 4096... (3 Replies)
Discussion started by: v_greg
3 Replies

5. UNIX for Dummies Questions & Answers

Default read/write/execute permissions

I am perplexed that my script execution is not always consistent in creating new files. Specifically, my group read/write/execute permissions. For instance, take a look at the following: -rw-rw---- 1 jg dp 18648 Aug 22 10:06 nx081508.txt -rw-rw---- 1 jg dp 22422 Aug 22 10:06... (1 Reply)
Discussion started by: joeyg
1 Replies

6. UNIX for Advanced & Expert Users

Directory Default Permissions

Hi, I have a directory with files and sub-directories. Users write files to it by using copy/create/tar/ftp etc. I want this directory to have default permissions of 775 (for its files and sub-dir as well). I tried the below 2 ways but they are not upto my exact requirement so i need a better... (4 Replies)
Discussion started by: prvnrk
4 Replies

7. UNIX for Dummies Questions & Answers

How to change default permissions on new files

Hello, I would like to know if there was any way I can change the default permissions for new files being generated within a certain directory. Would I need to have the same permissions set at the directory level as for the files being generated in it. Regards, Rdgblues (1 Reply)
Discussion started by: rdgblues
1 Replies

8. UNIX for Dummies Questions & Answers

changing default file permissions

How can I change the default permissions that are assigned when I create a file? (By default the file has: -rw-r--r-- ..... I'd like it to be -rw-r----- How can I change this default behavior? (8 Replies)
Discussion started by: FredSmith
8 Replies

9. UNIX for Dummies Questions & Answers

Setting Default Permissions for Files

Hi, I am setting up an area on a unix server where multiple people will be editing web pages. Can anyone tell me how to set it up the directory and subdirectories so that when a user creates a new file, it defaults to permissions of 664 or 775? I've tried using umask but from what I can... (1 Reply)
Discussion started by: robbieg
1 Replies

10. UNIX for Dummies Questions & Answers

default directory permissions

Hello, Is there a way to set the default permissions for a specific directory and all it's files and subdirectories? For example: I want the general umask to be -rwxr-x--- But I want the default for the cgi-bin directory and everything below it to be -rwxr-xr-x So that when I put... (3 Replies)
Discussion started by: Thumpasorus
3 Replies
Login or Register to Ask a Question