Setting umask 022 by default to my profile


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Setting umask 022 by default to my profile
# 1  
Old 11-24-2010
Error Setting umask 022 by default to my profile

Hello everyone,
I want to set my properties of my profile to umask 022 by default. I have an idea that i need to make the change in .profile file. Can you please help me, on how would i be able to set it.

Thanks,
Abhishek S.
# 2  
Old 11-24-2010
just add a line in your .profile
Code:
umask 022

# 3  
Old 11-24-2010
Hi i added that line in .profile and tried creating a file, under my home.. It still gets created with 660 permission.. same case with directory.. Am i missing out on any step here.

Thanks,
Abhishek S.
# 4  
Old 11-24-2010
Somehow your umask is 117 .
Are you using a Shell which executes .profile ?
You are using Shell, not ftp I hope?
Can you put a diagnostic "echo" after the "umask" line to prove that it is being executed?
# 5  
Old 11-24-2010
And I forgot to mention (thanks methyl!) : It will be effective at NEXT new login...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Default umask setting during ftp AIX

Hi, I have set below option in following file /etc/inetd.conf in AIX. ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd -u 2 But still it created the file with permission (640): -rw-r----- 1 ftptosas ftpusrg 6091 Jul 28 12:23 diff_061920.txt Required permission... (1 Reply)
Discussion started by: mageshpsv01
1 Replies

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

3. UNIX for Dummies Questions & Answers

setting the profile

What's the purpose of setting the profile in side the script? however the user when logins, the profile wil be set. Then why we need to use that explicitly inside the script? Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies

4. AIX

default umask setting during ftp

Hi all, How do i change the default primary group of files uploaded in AIX (via ftp) in such a way that the files will be owned by tom:staff? I understand that the default file permission can be set in /etc/profile for aix by adding a new line umask=032 Do I add a line in umask as well?... (5 Replies)
Discussion started by: chipahoys
5 Replies

5. UNIX for Dummies Questions & Answers

UMASK setting

How can we set the Sticky bit in the umask itself. Please help me :confused: I tried to set like umask 1000 but when I run umask, the value of umask is 00 (0 Replies)
Discussion started by: geniman2004
0 Replies

6. Shell Programming and Scripting

umask setting

dear all, i'm trying to set the default permission using umask commnd. i'm using bash shell and the permission of the .bash_profile file is -rwxr-x--- 1 tdmscrdr dba 370 Nov 7 12:21 .bash_profile but still i'm not able to change the default permissiom. in the .bash_profile... (1 Reply)
Discussion started by: panknil
1 Replies

7. Linux

setting daemon umask

I was asked to change the daemon umask on my RHEL4 machine. so, i changed the /etc/init.d/functions file. Does this take effect right away? I dont think it does, how can i get it to take affect without rebooting? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

8. AIX

umask setting on a logon script

hi, am new to AIX. i have an issue. iam asked to change the umask setting on a logon script on a server to prevent writable files. i logged in as the root user and typed in umask and it displays 022, which i believe is 755 for direc and 644 for files. 1) how to I identify where the logon script... (2 Replies)
Discussion started by: karthikosu
2 Replies

9. UNIX for Advanced & Expert Users

setting umask in FreeBSD 5.4

Hi, I need to change my umask from 22 to 0022. FreeBSD 5.4 has different way of looking at 22 and 0022. Untill 4.11 stable 022 and 0022 were same. Can anyone help me? Thanks in advance. Jimmy (0 Replies)
Discussion started by: jimmynath
0 Replies
Login or Register to Ask a Question