Visit Our UNIX and Linux User Community


Created FilePermission


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Created FilePermission
# 1  
Old 10-18-2001
Question Created FilePermission

Dear Experts
How can I change permanently those permission assignment when a file is going to be touched? I don't like use chmod each time I touch a file.
Best Regards
Reza
# 2  
Old 10-18-2001
salam,

check the man on umask

chaker
# 3  
Old 10-19-2001
Thanks a lot
Umask is xterm dependent and by logout it will not act any more. I think there must be a special file which I have to edit and then I can change the permission for all xterm windows permanently.
Cheers
Reza

Last edited by Reza Nazarian; 10-19-2001 at 08:51 AM..
# 4  
Old 10-19-2001
After chmod you might try a 'rehash'
I am not reallt sure what your problem is ?
# 5  
Old 10-19-2001
If you are using the bourne or bourne-again shells (sh or bash), you can add it to .profile or .bash_profile in your home directory. I believe the korn shell (ksh) will be able to read the .profile as well.
# 6  
Old 10-19-2001
Thanks
When I touch a file the permission which is assigned is 644 by deffault and I am looking to a way that the created file has the 754 as my own default independent of the xterm window or without using umask or chmod. By the way I am using Solaris 8.
Is it possible?
Cheers
Reza
# 7  
Old 10-19-2001
I don't think umask will let you default to creating files with any execute bit set. I don't know of any other way than either using umask or chmod to set perms on your files.

The closest I could get to what you want is:
cd
echo "umask 023" >> .profile


After you log out, then log in again, your new files will still have 644 permissions - no execute bit. - Sorry.
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #767
Difficulty: Medium
A victim cache is a cache used to hold blocks evicted from a CPU cache upon replacement.
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File not getting created

hi, i have a script wrriten where there is a temporary files getting created: echo "From:" ${usrname}@apps.mc.xerox.com>mail_txt it was working from a long time but now there is a error creating while creating this temporary file. here is the error log for this:... (15 Replies)
Discussion started by: lovelysethii
15 Replies

2. Programming

Using boost in program created by g++

I am trying to use the split provided by boost. I have a string and want to split on "/". string value = "trig/4"; Have no idea how to compile and link it. I have extracted boost in /chrisd/tomso-12.04/source/library/boost_1_52_0 In my program /raytrac.cc I have put ... (5 Replies)
Discussion started by: kristinu
5 Replies

3. UNIX for Dummies Questions & Answers

Who created a file?

Hi!Can somebody tell me what command can I use to find who created a file,please? (6 Replies)
Discussion started by: teotrask
6 Replies

4. UNIX for Dummies Questions & Answers

how to know what time one user was created?

I am using RHEL. I wan to know the creation time of one user? which command? (4 Replies)
Discussion started by: cqlouis
4 Replies

5. UNIX for Dummies Questions & Answers

.ssh directory not created

I have created a new user account on my openssh system.But the .ssh directory was not created under my home dir home/A00d56/. Could any one please suggest me whether the .ssh directory will be created automatically when we add the new user or we need to create that after? The use of this new... (3 Replies)
Discussion started by: srrao.ch
3 Replies

6. UNIX for Dummies Questions & Answers

How to know when a new file is created?

Hi All, How to we get to know when say a new log file is created on an Unix box. I need to trigger a process(say a script) when the new log file is created. But i need to know by some means or generate a trigger when a new file is created???? Something like when we receive a new mail we... (1 Reply)
Discussion started by: aixjadoo
1 Replies

7. UNIX for Dummies Questions & Answers

Date on which the account was created.

How to find the date of account creation ? I need some information regarding the users accounts.I have to find out the date on which the accounts were created. (1 Reply)
Discussion started by: nikhil_bedare
1 Replies

8. UNIX for Dummies Questions & Answers

Two Files Created For Every One?

Hello, my linux box is, for some reason, creating two files when I creat one. For example, if I create a file via the VI editor called TestFile, the box will create: TestFile TestFile~ Does anyone have any ideas as to why I'm getting that second file with the ~ at the end of it? ... (1 Reply)
Discussion started by: Atama
1 Replies

9. UNIX for Dummies Questions & Answers

File Created On attribute

Hi, I need to find out when a file has been created. 'ls -l' just lists the last date the file was modified. I have also noticed when viewing the attributes through NT, the last modified date is the same as the file creation date. I thought maybe this was a fault due to samba. I guess what... (1 Reply)
Discussion started by: dpalmer
1 Replies

Featured Tech Videos