Change mode drwxrwsr-x+ directory


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Change mode drwxrwsr-x+ directory
# 1  
Old 11-26-2014
Change mode drwxrwsr-x+ directory

Hi,

How to change mode "drwxrwsr-x+" in directory.
I'm able to set drwxrwsr-x but "+" is difficult to set.

Code:
~ $ las -las | grep done1
4 drwxrwsr-x+  3 root sfuser  4096 Nov 26 16:39 done1

~ $ getfacl done1
# file: done1
# owner: root
# group: sfuser
# flags: -s-
user::rwx
group::rwx
group:security:rwx
group:operation:rwx
mask::rwx
other::r-x

~ $ mkdir done2
~ $ chmod g+ws done2
~ $ ls -las | grep done2
4 drwxrwsr-x  1 3 root sfuser  4096 Nov 26 19:03 done2/


Try with setfacl but still doesn't work
Code:
~ $ setfacl -r -m user:sfuser:rwx -R done2
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...
Try `setfacl --help' for more information.

~ $ setfacl -R -m user:sfuser:rwx done2
setfacl: Option -m: Invalid argument near character 6

~ $ setfacl -R -m user:sfuser:rwx done2
setfacl: Option -m: Invalid argument near character 6

~ $ setfacl -R user:sfuser:rwx done2
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...
Try `setfacl --help' for more information.

~ $ setfacl -R -M user:sfuser:rwx done2
setfacl: user:sfuser:rwx: No such file or directory

# 2  
Old 11-26-2014
Hi,

Nice one, the "+" is part of the command not the permissions.

Regards

Dave
# 3  
Old 11-26-2014
The + in the permissions of a file indicate that alternative or additional access controls are in place for that file. In this case an access control list is present.

Once an ACL has been associated with a file, I don't remember if there is any way to remove the ACL from the file without creating a new file with the same contents, removing the file with the ACL, and renaming the new file to have the old name. In the case of a directory, that would be done by creating a new directory, moving files from the old directory (the one with the ACL) into the new directory (the one without an ACL), removing the old directory, and then moving the new directory to have the old directory's name.
This User Gave Thanks to Don Cragun For This Post:
# 4  
Old 11-26-2014
For Linux:

Code:
setfacl -b ...

Not sure offhand with Solaris. With Solaris if you chmod to an absolute value (0755, for example), that value is literally absolute - it will wipe out everything else.
This User Gave Thanks to achenle For This Post:
# 5  
Old 11-28-2014
You should probably find out what the + is referring to before you delete it. That may remind you there was a reason for it.
Quote:
getfacl filename
will do it. Look at the man page for explanations because the output is a bit different from ls. Then, as a previous poster mentioned, either of these forms
Quote:
setfacl -b filename
setfacl --remove-all filename
should set the permissions back to regular rwx stuff. It may happen that some of the rwx permissions seem to change. That's because ls reports a kind of summary of the permissions in some cases.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Change Param File Variable Test Mode Value

First two days of shell scripting... I've looked at awk/sed and man sed only to get off into the weeds of complexity that may not be needed here... hints for awk or sed or other method to magically change the bolded item below? Nutshell: HFTST=Y #test mode = true to false & back again so... (0 Replies)
Discussion started by: JeffPGMT
0 Replies

2. Emergency UNIX and Linux Support

HP-UX: Help to Change network configuration from APA manual mode (2Gbps) to simple fail over (1Gbps)

Hello HP-UX experts, Server = rx8640 Node partition OS = HP-UX 11.23 arch = IA64 Network switch = Foundry 16 port switch (1Gbps) Existing configuration: Tough to explain as it is very messy (see below for the link of zip of network related fles). 2 x 2Gbps aggregates configured some time... (1 Reply)
Discussion started by: prvnrk
1 Replies

3. AIX

Change processor compatibility mode without hmc

Hello, One of my colleagues is working on a p730 without HMC, only one LPAR has all resources. The server is showing some issues with Informix (10.00 & 11.50), the same config (OS & IFX) works perfectly on Power6 so I would like to ask him to change the processor compatibility mode to power6 on... (3 Replies)
Discussion started by: fapl
3 Replies

4. Shell Programming and Scripting

Change to directory and search some file in that directory in single command

I am trying to do the following task : export ENV=aaa export ENV_PATH=$(cd /apps | ls | grep $ENV) However, it's not working. What's the way to change to directory and search some file in that directory in single command Please help. (2 Replies)
Discussion started by: saurau
2 Replies

5. Shell Programming and Scripting

one line command to change mode only if necessary

hi, sorry for posting this for a quick answer. Is there a one line command to change permissions on files in a directory to a given mode (say 554) and only for those files that do not already have that mode? Running chmod updates the last access/modified timestamp on the files, and i want to... (11 Replies)
Discussion started by: ysrini
11 Replies

6. Solaris

[Solved] How to change my default login mode????

Hi guys, I have just installed Solaris 10 x86. My system boots into graphical login by default, I want to have text login only, where can I change that. I tried to use the linux and bsd concept of editing /etc/inittab, and change the default value to 3, but that doesn't work in Solaris. Please... (6 Replies)
Discussion started by: gabam
6 Replies

7. Shell Programming and Scripting

change the mode of the file after FTP

Hi I am FTPing a file to a remote server from my local server. But after I FTP it the permissions are not in executable option, I need to change the permissions of the FTPed file how can i do that. Below is my script LOCALDIR=/batch/ediprocess LOCAL_BACKUP_DIR/batch/ediprocessBackUp... (4 Replies)
Discussion started by: shanth_chandra
4 Replies

8. HP-UX

change time mode from BST to GMT

I want to know how to change the time zone from BST to GMT avoid the daylight savings in hp-ux (3 Replies)
Discussion started by: tomjones
3 Replies

9. UNIX for Dummies Questions & Answers

chmod mode as permision drwxrwsr-x

All, As first i searched in google but no result . Also i searched in the forum as well. I am having a directory with permision drwxrwsr-x i want to create a new directory with same permision . I know S denotes stick bit i tried to creat a directory and modify by chmod as chmod... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

10. UNIX for Dummies Questions & Answers

How do I change IP addresses in command mode...

How do I change IP addresses in command mode? i need to assign custom (non DHCP) addresses from the command line. Actually I also need to know how to change the subnet mask, the gateway and the primary, secondary, ... dns servers. (6 Replies)
Discussion started by: Super.Anyak
6 Replies
Login or Register to Ask a Question