umask dosn't set execute bit on files (ie file permissions start with 666 directories with 777)
so for files
And directories
There is no option to have umask set file permissions the same as their parent directory (and you wouldn't want to do that anyway as execute bit on directories controls searchability and has nothing to do with the execute bit on files within them).
You should only set execute bit on files that are actual commands (like script files or compiled programs).
If you want different permissions to these defaults, use the chmod command to change them after you've created your file.
The t on a directory is the sticky bit and means that only the file owner (or root) can remove files once they are created, even though the directory permissions allow write.
Last edited by Chubler_XL; 11-15-2010 at 01:51 PM..
This User Gave Thanks to Chubler_XL For This Post:
Can anyone help explain the "s" in the below permissions example. I was reading about the "sticky bit" (t) but I am a little confused.
On file "test"
wolf% chmod 4777 test
wolf% ls -l
total 4
drwx------ 2 john staff 512 Mar 19 21:34 nsmail
-rwsrwxrwx 1 john staff ... (2 Replies)
Hi everyone, I'm looking for some information concerning Unix permissions. I am new to Unix and am doing research for a graduate class. Given the permissions below, can anyone give me five unique exploits that would be available to a hacker/cracker given this configuaration?
-rw-rw-rw- 1... (1 Reply)
I saved a perl code in xemacs. I used an xterminal to execute it but unix said that I don't have permission. I saved the files in my home directory. How do I change the permission. This is hat unix said:
-ksh: ./names.pl: cannot execute (5 Replies)
Hey,
We've got quite a strange problem on our hands here. We are running an HP 9000/800 B.11.00.
I've just created a new group in /etc/group which i called, let's say newgroup . Then I added 4 users to the group, namely user1, user2, user3, user4 . The command grpchk shows no strange things... (4 Replies)
Hi,
I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory.
Thanks in advance.
Mike (3 Replies)
Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Hi,
I have noticed that on my Linux box there is a nice feature which make it impossible for specified member (owner, group or other) to have an given access if a member from which we would expect it more don't have that access.
So it is impossible to read file by all if others have set read... (3 Replies)
Hi guys,
i write the below script to make the user get to the directory that interesting. Now what I am trying is to check the permissions of the directory and if the directory exists to check the reading options.
echo "Please enter your desire folder directory ( \yourfolders) ?: \c"
... (9 Replies)
Discussion started by: mikerousse
9 Replies
LEARN ABOUT OSF1
mkfifo
mkfifo(1) General Commands Manual mkfifo(1)NAME
mkfifo - Makes FIFO special files
SYNOPSIS
mkfifo [-m mode] file...
The mkfifo utility creates FIFO special files in the order specified.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
mkfifo: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
Sets the file permission bits of the new file to the specified mode value, after creating the FIFO special file. The mode argument is a
symbolic mode string (see chmod), in which the operator characters + (plus sign) and - (minus) are interpreted relative to the default file
mode for that file type. The + character adds permissions to the default mode, and - deletes permissions from the default mode.
[Tru64 UNIX] The default mode is a=rw (permissions of rw-rw-rw) as modified by the current file mode creation mask (umask).
OPERANDS
The path name of a FIFO special file to be created.
DESCRIPTION
For each file argument, mkfifo performs actions equivalent to the mkfifo() call with the following arguments: The file argument is used as
the pathname argument. If the -m option is not used, the value of the bitwise inclusive OR of S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH,
and S_IWOTH is used as the mode argument.
EXIT STATUS
The mkfifo utility exits with one of the following values: Indicates that all the specified FIFO special files were created successfully.
Indicates that an error occurred.
EXAMPLES
To create a FIFO special file with permissions prw-r--r--, enter: mkfifo -m 644 /tmp/myfifo
The command creates the /tmp/myfifo file with read/write permissions for the owner and read permission for the group and for others.
To create a FIFO special file using the - (minus) operand to set permissions of prw-r-----, enter: mkfifo -m g-w,o-rw /tmp/fifo2
The command creates the /tmp/fifo2 file, removing write permission for the group and all permissions for others.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of mkfifo: Provides a default value for the internationalization variables that
are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization
variables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string
value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of
bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the
format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of
LC_MESSAGES.
SEE ALSO
Commands: mkdir(1), mknod(8)
Functions: chmod(2), mkdir(2), mkfifo(3), mknod(2), umask(2)
Standards: standards(5)mkfifo(1)