Default Permissions in Unix

hoppa

Senior member
Apr 10, 2004
253
0
0
When I create files on a remote server the permissions are always really restrictive and I have to change them for every single file and folder I make, which is a pain. How can I change it so that files and folders will all default to 755 upon creation?
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Most systems set a default umask of 0022, which produce directories with 755 permissions (= 777 & 022, "&" = bitwise AND) and files with 644 permissions (= 666 & 022). If you type "umask" with no arguments, it will show you what your current umask is. If it's already 0022 (or 022), then the permissions are being forced by the remote server (SMB/CIFS probably?) and there's nothing you can do about it other than change them manually.
 

hoppa

Senior member
Apr 10, 2004
253
0
0
It was set to 77. I changed it to 755 (umask 755) though it hasn't seemed to do anything. I guess that's not right?