You control global permission setting using umask. What umask does is - it applies a mask to the global permissions. Normally when files are created, the default permissions set are
Quote:
666 for files
777 for directories
This will be applicable if umask is set to 0(zero). If set a mask value of 022 like
then, the permissions generated are
Quote:
for files -> 666 - 022 = 644 (i.e) rw-r--r--
for dirs -> 777 - 022 = 755 (i.e) rwxr-xr-x
you can see the current umask setting by just giving
Quote:
umask
So, if you want to generate files with a definite set of permissions, you set the umask value accordingly in your .profile file. Ofcourse, you cant set 777 to a file by default as every file need not be executable.
I've got 100 directories that each have 2 directories with in them.
Structered like this:
/home/domains/domain1/
through to
/home/domains/domain100/
and those 2 directories mentioned above are here:
/home/domains/domain1/directory1/
/home/domains/domain1/directory2/
through to... (7 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hey, I've got a script using mailx to send an email to the user, but i'd like it if I could have it send the email sometime in the future, not right away. And by future, i mean like 1 minute in the future.
And I don't want it to halt the script in anyway. Perhaps there's a way to have it... (3 Replies)
Hi. I am new to shell scripting.
I am writing a simple sequential logic script. After completing the script, the instructions say "use the sh command instead of the chmod comand".
Why didn't I have to use "chmod ugo+x scriptname",& then type ./ scriptname or just scriptname after using chmod?... (3 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I copy home directory, file /etc/passwd, file /etc/group, file /etc/master.passwd
to the new server.
This is result of "ls/home" on the old server.
drwxr-xr-x 3 user1 user1 512 Aug 3 2012 user1
drwxr-xr-x 19 user2 user2 2560 Jan 9 09:24... (4 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT MINIX
chmod
CHMOD(1) General Commands Manual CHMOD(1)NAME
chmod - change access mode for files
SYNOPSIS
chmod [-R] mode file ...
OPTIONS -R Change hierarchies recursively
EXAMPLES
chmod 755 file # Owner: rwx Group: r-x Others: r-x
chmod +x file1 file2
# Make file1 and file2 executable
chmod a-w file # Make file read only
chmod u+s file # Turn on SETUID for file
chmod -R o+w dir # Allow writing for all files in dir
DESCRIPTION
The given mode is applied to each file in the file list. If the -R flag is present, the files in a directory will be changed as well. The
mode can be either absolute or symbolic. Absolute modes are given as an octal number that represents the new file mode. The mode bits are
defined as follows:
4000 Set effective user id on execution to file's owner id
2000 Set effective group id on execution to file's group id
0400 file is readable by the owner of the file
0200 writeable by owner
0100 executable by owner
0070 same as above, for other users in the same group
0007 same as above, for all other users
Symbolic modes modify the current file mode in a specified way. The form is:
[who] op permissions { op permissions ...} {, [who] op ... }
The possibilities for who are u, g, o, and a, standing for user, group, other and all, respectively. If who is omitted, a is assumed, but
the current umask is used. The op can be +, -, or =; + turns on the given permissions, - turns them off; = sets the permissions exclu-
sively for the given who. For example g=x sets the group permissions to --x.
The possible permissions are r, w, x; which stand for read, write, and execute; s turns on the set effective user/group id bits. s only
makes sense with u and g; o+s is harmless.
SEE ALSO ls(1), chmod(2).
CHMOD(1)