Permission change query


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Permission change query
# 1  
Old 07-18-2008
Permission change query

I need to change permission for a directory from drwxrwxrwx to drwxr--s--T

What chmod command will work?

What will be the number code to represent the required permission?
# 2  
Old 07-18-2008
The number is 3710 and
chmod 3710 dir
should work. Unless your chmod implements silly restrictions against this (as, I believe, Solaris does). In that case, cheat a little bit with...
perl -e 'chmod(03710, shift);' dir

Code:
$ chmod 0 file
$ perl -e 'chmod(03710,shift);' file
$ ls -l file
-rwx--s--T  1 bin  other  41 Jul 18 02:27 file
$

# 3  
Old 07-18-2008
Thanks Perderabo. I've read many of your articles in this site. It would be good if you could write one about permissions (including handling s and t bits).

Thank You!
# 4  
Old 07-18-2008
Quote:
Originally Posted by krishmaths
Thanks Perderabo. I've read many of your articles in this site. It would be good if you could write one about permissions (including handling s and t bits).

Thank You!
Smilie Ummm, that's a joke, right?


https://www.unix.com/tips-tutorials/1...rmissions.html
# 5  
Old 07-19-2008
Somehow I missed this one. Thank You!

You simply rock, Perderabo! Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Unable to change the permission for directory

unable to chnage the ownership as group does not exist ls -ltr drwxr-xr-x 2 1520291 remote 1024 Sep 25 2014 img root@servername#chown content:remote img chown: img: Not owner (1 Reply)
Discussion started by: raghur77
1 Replies

2. UNIX for Dummies Questions & Answers

Change permission to a directory

Hi, How do i change the permission to read/write to a windows directory? (1 Reply)
Discussion started by: lg123
1 Replies

3. Shell Programming and Scripting

Change the file permission

Guys, I need help. I need to change the .txt file permission after I have reset the file content to 0. The code that reset the file content to 0 is as follows: #!/bin/sh for i in /root/script/*.txt do echo "0" > $i done However, the file is generated by the apache application,... (3 Replies)
Discussion started by: jasperux
3 Replies

4. HP-UX

could not able change permission of /home dir

Hi i am new to this admin area . i have created user with name as "ab" and gave home dir as /home/ab . when i tried to create the /home/ab dir , i got he following error. "mkdir: Failed to make directory "/home/ab"; Operation not applicable " Thanks in advance . (1 Reply)
Discussion started by: expert
1 Replies

5. UNIX for Dummies Questions & Answers

Change permission for a set of files

Hi there, I want to change from this permission -r-xr-xr-x to -r-xr-xr-- for a set of files under unix. Can someone help me to go-about doing this in one shot. Cheers, RN (2 Replies)
Discussion started by: karthickrn
2 Replies

6. UNIX for Dummies Questions & Answers

Root cannot change /home permission

Folks; I'm a root but i couldn't change /home directory permission or group. i'm getting operation not permitted. Any help? (6 Replies)
Discussion started by: moe2266
6 Replies

7. Solaris

Permission Change Upon Reboot

I have a Sun 4800 running on Solaris 9 OS. Each time I reboot the server the permissions on /tmp are change from root/sys 1777 to root/root 775. This causes a problem as I have custom programs the need this directory set to root/sys. I have search the sun site and can't find a solution. Anybody... (2 Replies)
Discussion started by: gross
2 Replies

8. UNIX for Advanced & Expert Users

change permission chmod

Hi, when I launch my perl script, I write on the shell: perl x.pl How I can can change the permission to write only: x to launch the program? (2 Replies)
Discussion started by: Minguccio75
2 Replies

9. Shell Programming and Scripting

Change permission for directories and files

Is there a way to change subdirectories permission plus the files in the subdirectories in a directory i specified without using the find command? (1 Reply)
Discussion started by: mingfei2006
1 Replies

10. UNIX for Advanced & Expert Users

Timestamp of File permission change

Hi!! Experts, Is there any way to find the timestamp when the permission of a file was modified?? I mean no change to file contents.. Just the chnage of permissions. :) (1 Reply)
Discussion started by: jyotipg
1 Replies
Login or Register to Ask a Question