Sponsored Content
Full Discussion: UNIX File Permissions
Top Forums UNIX for Advanced & Expert Users UNIX File Permissions Post 66529 by Perderabo on Tuesday 15th of March 2005 10:34:43 AM
Old 03-15-2005
That S stands for "set gid", which was originally the only use of that bit. In octal the permission bits are 2666. But the "set gid" concept is useless here because no execute bits are set. When file locking was added to unix, this combo of bits was used to indicate enforcement mode. So enforcement mode file locking is enabled for this file. See "man lockf".
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix permissions

I am currently running jsp pages on unix server. At the top of my page is the import statement: <%@ page import="survey.*"%>. This imports the survey folder which i have placed in the same directory as my jsp page- jsp-servlet. However, when i try to run the page, its gives me an error saying that... (2 Replies)
Discussion started by: moukoko
2 Replies

2. Solaris

Unix permissions

Is anyone aware of a tool that would produce a report or an extract file of all users, the files thry are allowed to access and their associated rights permitted (Read,Write etc.) (0 Replies)
Discussion started by: mobershaw
0 Replies

3. UNIX for Dummies Questions & Answers

Unix permissions for a newbie

Okay, this may turn out to be something quite simple, but I haven't found the answer so far: 1) Is it possible to retrieve a list of user(ID) file permissions? and then... 2) What is the most efficient way to create an alert/error message when/if those file permissions are denied? ... (2 Replies)
Discussion started by: hades1013
2 Replies

4. Shell Programming and Scripting

Unix File Permissions

I want to change one of my Dir permissions to drwx--S--- Can you tell me which number i have to use. Thanks in Advance (4 Replies)
Discussion started by: veeru
4 Replies

5. UNIX for Dummies Questions & Answers

Unix Permissions

We have a user group ‘norkgrp’ which is having 2 users ‘norkadm’ and ‘oracle’. Further we have a directory ‘fstf_blobs’ where ‘norkadm’ is the owner and ‘norkgrp’ is the group owner. The permission is set as 770. $ ls -lrt drwxrwx--- 2 norkadm norkgrp 1024 Jun 24 05:03 fstf_blobs We... (5 Replies)
Discussion started by: varunrbs
5 Replies

6. Solaris

Unix file, folder permissions, security auditing tools.

I want to periodically check if ASCII password/config files on Unix have 400 or 600 access. Folders and files are owned by designated group and user. Folders and Files do not have world write access. Are there any tools/scripts available for this kind of auditing that I can use on Solaris? (7 Replies)
Discussion started by: kchinnam
7 Replies

7. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

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)
Discussion started by: right_coaster
3 Replies

8. Tips and Tutorials

Unix File Permissions

Introduction I have seen some misinformation regarding Unix file permissions. I will try to set the record straight. Take a look at this example of some output from ls: $ ls -ld /usr/bin /usr/bin/cat drwxrwxr-x 3 root bin 8704 Sep 23 2004 /usr/bin -r-xr-xr-x 1 bin bin ... (6 Replies)
Discussion started by: Perderabo
6 Replies
flock(2)							System Calls Manual							  flock(2)

NAME
flock() - apply or remove an advisory or enforced lock on an open file SYNOPSIS
Parameters filedes Specifies a file descriptor returned by a successful or function, identifying the file on which the locking operation is to be performed. operation Specifies one of the following constants for defined in the file: Apply a shared lock. Apply an exclusive lock. Remove a lock. In addition to the preceding constants, the following constant can be bitwise ORed with either or LOCK_NB Do not block when locking. DESCRIPTION
The function applies or removes an advisory or enforced lock on the whole file associated with the filedes file descriptor. Advisory locks allow cooperating processes to perform consistent operations on files, but do not guarantee consistency (that is, processes may still access files without using advisory locks, possibly resulting in inconsistencies).Enforced locks are in effect if the enforcement bit in the file mode is set (see chmod(2)). This might affect and other system calls performing file operations. You can use the function to coordinate a file's lock status on local and NFS file systems. The locking mechanism allows two types of locks: and At any time multiple shared locks may be applied to a file, but at no time are multi- ple exclusive locks or both shared and exclusive locks allowed simultaneously on a file. A shared lock may be upgraded to an exclusive lock, and vice versa, simply by specifying the appropriate lock type. This results in the previous lock being released and the new lock applied (possibly after other processes have gained and released the lock). Requesting a lock on an object that is already locked normally causes the caller to be blocked until the lock may be acquired. If is included in operation, this will not happen; instead, the call will fail and will be set to APPLICATION USAGE
Locks are on files, not file descriptors. This means that: o Locks are not inherited by a child process resulting from a call. o All locks associated with a file for a given process are removed when any thread in the process closes any file descriptor for that file. Processes that are blocked awaiting a lock may be awakened by signals. An application needs to check the return value to make sure that the lock is really acquired. The interface is not part of any UNIX standard. Therefore, if you are designing and writing applications to be portable across platforms, you should use the file locking interface instead of NETWORKING FEATURES
NFS The advisory file locking capabilities of are implemented throughout the network by the network lock daemon If the file server crashes and is rebooted, the lock daemon attempts to recover all locks associated with the crashed server. If a lock cannot be reclaimed, the process that held the lock is issued a signal. See lockd(1M). File locking as implemented for NFS files is only advisory. RETURN VALUES
flock() returns: for successful completion for unsuccessful completion; is set to indicate the error ERRORS
If the function fails, may be set to one of the following values: The filedes parameter is not a valid open file descriptor. A shared lock was requested and filedes was not opened for reading, or an exclusive lock was requested and filedes was not opened for writing. The lock is blocked by some lock from another process. Putting the calling process to sleep while waiting for that lock to become free would cause a deadlock. A signal interrupted the call. The filedes parameter refers to a file that does not support locking. The operation parameter is not valid. The lock table is full. Too many files are already locked. The filedes parameter refers to an NFS file with the access bits set for enforcement mode. The filedes parameter refers to an NFS file, and a system error occurred on the remote node. The file is locked and the option was specified. The file is mapped into virtual memory via the system call (see mmap(2)). SEE ALSO
lockd(1M) chmod(2), close(2), creat(2), dup(2), dup2(2), exec(2), fcntl(2), fork(2), lockf(2), open(2), read(2), truncate(2), write(2). STANDARDS CONFORMANCE
flock(2)
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy