File creation with default access


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users File creation with default access
# 1  
Old 10-03-2012
File creation with default access

Hi,

I want to create files and directories with below access control

System. AIX

File should have 664 permission
Directories should have 755

Can you please let me know how to achieve this?
# 2  
Old 10-03-2012
could you please refer the umask man page... I am pretty sure you can manage this on your own Smilie
# 3  
Old 10-03-2012
By default, the directories are created using 755 and files are created using 644 when we use umask of 0022.

but i want to files to be generated as 664 and directory remain same as 755.

If I set umask as 002, the files are created using 664 but directories created with 775 permission.
# 4  
Old 10-03-2012
I don't think you can do both with one umask.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to print the specific part of the file name with file creation date?

Hello Folks, I have an requirement, where i need to get total count of the file based on creation date with there filename selected pattern. Filename: MobileProtocol.20171228T154200.157115.udr I want to get the count of files created on each day based on a pattern find. find . -type... (7 Replies)
Discussion started by: sadique.manzar
7 Replies

2. Programming

File creation problem

I am creating a file to store data, but the file does not get created at all. #include <unistd.h> #define DEFAULT_ID 0 int main() { int d, n=0; int sz, data=0; char fn; char *bv; snprintf(fn, 256, "bv", DEFAULT_ID); bv=fn; printf("%s\n", bv); if ((d =... (4 Replies)
Discussion started by: powyama
4 Replies

3. Shell Programming and Scripting

File creation

Hi I need to write a file with value value from Paramer which is passed from datastage. It should overwrite the file if already exists. Can anybody provide command for this? (1 Reply)
Discussion started by: cnrj
1 Replies

4. Shell Programming and Scripting

Help with creating a text file in perl with file creation date.

Hi, I am quite new to Perl scripting and i need to create a .TXT file using perl, with fields (A,B,C,D,E), and this text file should be named with current file creation date "XYZ_CCYYMMDD.TXT" (i.e.XYZ_2011042514:33 PM). Can anyone who has done this, please share their expertise on this... (5 Replies)
Discussion started by: msrahman
5 Replies

5. UNIX for Dummies Questions & Answers

User creation (with only read only access)

I need to create a user with least permission on the production server. He should only be able to read or execute the files that to be specific. For example: I just need to give him a set of commands to run.Besides those command execution He should be prevented to run any other command and He... (2 Replies)
Discussion started by: pinga123
2 Replies

6. Shell Programming and Scripting

File Creation Problem

I recently got a problem with a program. It said that Create a file using shell script and insert details in it and take a String from the user and see whether it matches with any of the details of the String. I know how to create a file, insert details, but hw to check whether the String matches... (2 Replies)
Discussion started by: ramj
2 Replies

7. Solaris

gzip a file and append creation date stamp to file

I want to gzip a file and append the creation date to the end of the file. How can I accomplish this task. Basically they are log files which need a creation date stamp appended to make sure they do not overwrite other log files. -jack (3 Replies)
Discussion started by: jacktravine
3 Replies

8. UNIX for Advanced & Expert Users

file creation

Hi, Is there any way to restrict directories with one type of file creation. regards. (8 Replies)
Discussion started by: guguli
8 Replies

9. Shell Programming and Scripting

file creation

hi guys Kindly see the below script #!/bin/bash if then # check to see if file notrouter exits or not if ! ls -l notrouter /root/joy/ >/dev/null then touch /root/joy/notrouter else echo "Entries already exist" fi else echo "Entries does not exist" fi here... (1 Reply)
Discussion started by: whizkidash
1 Replies

10. Linux

creation of a file

how to create a file with the same modification time as another file is having using the copy command? (1 Reply)
Discussion started by: infyanurag
1 Replies
Login or Register to Ask a Question