Sponsored Content
Full Discussion: Sticky bits and umasks
Top Forums UNIX for Advanced & Expert Users Sticky bits and umasks Post 302306392 by TonyFullerMalv on Sunday 12th of April 2009 03:50:12 PM
Old 04-12-2009
If you want files to have the same group owner as the directory then you can set the group sticky bit (chmod g+s), if the folder is not world writeable then the user has to be a member of that group (secondary or primary), I can't think how you can allow users to write files into a folder without them having permissions to create subfolders.

If you have a directory /export/foo with a subdirectory called bar:
1. You want users to be able to create files in foo.
2. Only root may create files in bar.
3. Users to be able to only read/list/access files in bar.
4. Files in bar have the only read/execute permissions for non-root users.
then:

Code:
# chown root:groupname /export/foo
# chmod 1770 /export/foo
# chmod g+s /export/foo
# chown root:root /export/foo/bar
# chmod 750 /export/foo/bar
# chmod g+s /export/foo/bar

The umask for the root account will need to be 027 and its primary group should be root or else it should run "newgrp root" before creating files in /export/foo/bar.
I am assuming all your users requiring access to this folder will be in a common group (called groupname in this example ).

Last edited by TonyFullerMalv; 04-12-2009 at 05:01 PM..
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Changing 24 bits to 8 bits display

Hello all, I was wondering if anyone can tell me how to change 24 bits depth display to 8 bits depth display for Sun Ultra1, running Solaris 8? THANKS in advance. I think that the command is ffbconfig, but it has nothing about depth. (4 Replies)
Discussion started by: larry
4 Replies

2. Solaris

Unix Sticky Bits

I cant get the Sticky Bits idea, i do changing mod in Unix by chmod 744 for example and its mean the 7 is for owner and 4 is for group and 4 for other, how can the system determine that there is isomething before 744 which mean 00744 in this case is the 7 still for the owner and if saw how the... (3 Replies)
Discussion started by: XP_2600
3 Replies

3. Shell Programming and Scripting

sticky bit

Hi frns, What is command to list out all dir's for which sticky bit has been set. Regards, Manu (2 Replies)
Discussion started by: manu.vmr
2 Replies

4. AIX

How to convert a partition usin 64 bits kernel to 32 bits kernel?

Hello there: I know that exist a procedure to convert an OS using 32bits kernel to 64 bits kernel. But, exist a procedure to convert an OS using 64bits to 32 bits kernel? Please help me. Regards. (2 Replies)
Discussion started by: GEIER
2 Replies

5. UNIX for Dummies Questions & Answers

32 bits procesaor with 64 bits Solaris

people i have a problem i have a 32 bits sparc processor, and solaris 64 bits processor, i install a oracle data base 64 bits, but my oracle will not run because my processor is from 32 bits this is ok??, i know if i have x86 i cannot install a 64 bits operatin system in a 32 bits processor. ... (0 Replies)
Discussion started by: enkei17
0 Replies

6. AIX

sticky bit

as far as i understand, if sticky bit is set on a directory, the files created under tht directory cannot be deleted by ordinary user... but we can do ths by permission itself,,, tht's assign only read permission to tht dirrectory wht 's the difference? (1 Reply)
Discussion started by: udtyuvaraj
1 Replies

7. What is on Your Mind?

Place Bits & Win Bits!!! - 17th Annual Satellite Awards

Ten movies have been nominated as best motion picture by the International Press Academy, presentation of the 2012 Satellite Awards will be held on 16th December at Los Angeles, CA. Place your bits here on one of the below nominated movie of your choice:- Argo ... (0 Replies)
Discussion started by: Yoda
0 Replies
LIBPFM(3)						     Linux Programmer's Manual							 LIBPFM(3)

NAME
libpfm_intel_snbep_unc_cbo - support for Intel Sandy Bridge-EP C-Box uncore PMU SYNOPSIS
#include <perfmon/pfmlib.h> PMU name: snbep_unc_cbo[0-7] PMU desc: Intel Sandy Bridge-EP C-Box uncore PMU DESCRIPTION
The library supports the Intel Sandy Bridge C-Box (coherency engine) uncore PMU. This PMU model only exists on Sandy Bridge model 45. There is one C-box PMU per physical core. Therefore there are eight identical C-Box PMU instances numbered frmo 0 to 7. On dual-socket sys- tems, the number refers to the C-Box PMU on the socket where the program runs. For instance, if running on CPU8, then snbep_unc_cbo0 refers to the C-Box for physical core 0 on socket 1. Conversely, if running on CPU0, then the same snbep_unc_cbo0 refers to the C-Box for physical core 0 but on socket 0. Each C-Box PMU implements 4 generic counters and a filter register used only with certain events and umasks. MODIFIERS
The following modifiers are supported on Intel Sandy Bridge C-Box uncore PMU: i Invert the meaning of the event. The counter will now count C-Box cycles in which the event is not occurring. This is a boolean mod- ifier e Enable edge detection, i.e., count only when there is a state transition from no occurrence of the event to at least one occurrence. This modifier must be combined with a threshold modifier (t) with a value greater or equal to one. This is a boolean modifier. t Set the threshold value. When set to a non-zero value, the counter counts the number of C-Box cycles in which the number of occur- rences of the event is greater or equal to the threshold. This is an integer modifier with values in the range [0:255]. nf Node filter. Certain events, such as UNC_C_LLC_LOOKUP, UNC_C_LLC_VICTIMS, provide a NID umask. Sometimes the NID is combined with other filtering capabilities, such as opcodes. The node filter is an 8-bit max bitmask. A node corresponds to a processor socket. The legal values therefore depdend on the underlying hardware configuration. For dual-socket systems, the bitmask has two valid bits [0:1]. cf Core Filter. This is a 3-bit filter which is used to filter based on phyiscal core origin of the C-Box request. Possible values are 0-7. If the filter is not specified, then no filtering takes place. tf Thread Filter. This is a 1-bit filter which is used to filter C-Box requests based on logical processor (hyper-thread) identifica- tion. Possibles values are 0-1. If the filter is not specified, then no filtering takes place. Opcode filtering Certain events, such as UNC_C_TOR_INSERTS supports opcode matching on the C-BOX transaction type. To use this feature, first an opcode matching umask must be selected, e.g., MISS_OPCODE. Second, the opcode to match on must be selected via a second umasks amongs the OPC_* umasks. For instance, UNC_C_TOR_INSERTS:OPCODE:OPC_RFO, counts the number of TOR insertions for RFO transactions. Opcode matching may be combined with node filtering with certain umasks. In general the filtering support is encoded into the umask name, e.g., NID_OPCODE supports both node and opcode filtering. For instance, UNC_C_TOR_INSERTS:NID_OPCODE:OPC_RFO:nf=1. AUTHORS
Stephane Eranian <eranian@gmail.com> August, 2012 LIBPFM(3)
All times are GMT -4. The time now is 11:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy