How to create all files generated in a directory with 644 permissions?


 
Thread Tools Search this Thread
Operating Systems AIX How to create all files generated in a directory with 644 permissions?
# 8  
Old 10-16-2014
Quote:
Originally Posted by suresh3566
Now, whatever the files generating in this directory, should generate with 644 permissions. How to get this?
Directories do not work that way.

Set a umask of 022 for your user or application. umask 022 in their ~/.profile may be sufficient for a user, depending on what shell they use. For an application, that depends on the application. More details, please.
# 9  
Old 10-16-2014
As vbe and corono688 mentioned umask value goes with user.

In AIX you can set umask for each user or set default value for all users

Code:
To change the umask value
chuser umask=022 <username>

The file which hold this information is 
"etc/security/user"

You have to run the above command as root.

Now the question is, how are you getting the file? ftp, sftp , cp, scp etc.., or are you generating the file from within application/DB?
# 10  
Old 10-16-2014
I have application user abc who creates the files in dump - directory. One more user xyz has to read the file in the directory. With 644 permission we are able to do this. I may not have root access every time. How to set umask configurations? Please help.
# 11  
Old 10-16-2014
Ok,
Check for the umask value on local service ID (for application).
Code:
lsuser -a umask <username>
lsuser -a umask abc  (abc is user)
abc umask=XXX

If the value is NOT 022 or 22 (both mean same, then change it to 022

Code:
chuser umask=022 <username>
chuser umask=022 abc

Again list umask
Code:
lsuser -a umask abc

Note: You have to restart the application for changes to be effective.

I hope this helps.

Last edited by ibmtech; 10-16-2014 at 06:36 PM.. Reason: Forgot codetags
# 12  
Old 10-16-2014
Quote:
Originally Posted by suresh3566
I have application user abc who creates the files in dump - directory.
Try setting the umask for the user abc.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to create a summary file of all files in a directory sorted in reverse alphabetical order.?

I have an interactive script which works terrific at processing a folder of unsorted files into new directories. I am wondering how I could modify my script so that( upon execution) it provides an additional labelled summary file on my desktop that lists all of the files in each directory that... (4 Replies)
Discussion started by: Braveheart
4 Replies

2. Shell Programming and Scripting

How Create new directory and move files to that directory.?

Hi All, We have main directory called "head" under this we have several sub directories and under these directories we have sub directories. My requirement is I have to find the SQL files which are having the string "procedure" under "head" directory and sub directories as well. And create... (14 Replies)
Discussion started by: ROCK_PLSQL
14 Replies

3. Shell Programming and Scripting

List files with date, create directory, move to the created directory

Hi all, i have a folder, with tons of files containing as following, on /my/folder/jobs/ some_name_2016-01-17-22-38-58_some name_0_0.zip.done some_name_2016-01-17-22-40-30_some name_0_0.zip.done some_name_2016-01-17-22-48-50_some name_0_0.zip.done and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies

4. Shell Programming and Scripting

Create dynamical from files in directory

Hello I putting together a menu script for some processing operations and I want to do the following, was googling for some time, but can figure the following out. Im in a folder lets say /input_files I want to list the files something like the following, each file is assigned a number,... (3 Replies)
Discussion started by: kl1ngac1k
3 Replies

5. UNIX for Dummies Questions & Answers

Need help how to create a file (xml) list all files from directory

I have more than 10K songs in two directories on a hard drive. I would like to create a file list all of files name then change to .xml extension to upload to iPhone so I have a Karaoke list on my iPhone. I need your help to create a file by using command in Linux. Files names: 0001 More... (4 Replies)
Discussion started by: ggcc
4 Replies

6. Shell Programming and Scripting

Checking directory permissions on UNIX directory

Hi, How do i check if I have read/write/execute rights on a UNIX directory? What I'm doing is checking read access on the files but i also want to check if user has rights on the direcory in whcih these files are present. if then...... And I check if the directory exists by using... (6 Replies)
Discussion started by: chetancrsp18
6 Replies

7. Shell Programming and Scripting

How to create multiple list of files in a directory ?

Hi, i have say 100 files in a directory. file1.log file2.log file3.log file4.log file5.log file6.log ... ... ... file99.log file100.log ========= I need to create another file which contains the list of al these log files. each file should contain only 10 log file names. it shud... (4 Replies)
Discussion started by: robinbannis
4 Replies

8. UNIX for Dummies Questions & Answers

SCO 5.0.7 Cron creates files with 600, need 644

Hi, I've searched and read, and searched and read some more; but I'm still not connecting the dots or understanding what I need to change. I have a script that creates a file. If I run it as root, the file gets created with 644 permissions like I want. That seems to make sense (at least I... (2 Replies)
Discussion started by: 65bit
2 Replies

9. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

10. UNIX for Dummies Questions & Answers

new directory - how to force files created in it to inherit grp,own and permissions

Hi, I'm new to unix -solaris. I've just upgraded a third party software product and am testing it to see if new files created in a test database directory were being created properly and they aren't. They're owned by the user that created the file, instead of poppa and the group of their files... (2 Replies)
Discussion started by: avisb
2 Replies
Login or Register to Ask a Question