1748114 Members
3305 Online
108758 Solutions
New Discussion юеВ

change mode

 
SOLVED
Go to solution
Krisklan
Advisor

change mode

Hi,
Just a small qustion:
how do I change the file permissions of a file which presently shows:
drwxrwxr-x 2 root sys 96 jobs


to the file permissions i need as:

drwxrwsr-x 2 root bin 96 jobs

Points shall be awarded for any help. thanks!

5 REPLIES 5
Torsten.
Acclaimed Contributor
Solution

Re: change mode

Permissions are the same, the owner **group** is different.

see

http://docs.hp.com/en/B3921-60631/chown.1.html

man chgrp

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Deepak Kr
Respected Contributor

Re: change mode

Hi

Use following command:

#chgrp bin jobs
or
#chown root:bin jobs
#ll -d jobs
you should get
drwxrwsr-x 2 root bin 96 jobs

jobs is a directory here
"There is always some scope for improvement"
James R. Ferguson
Acclaimed Contributor

Re: change mode

Hi:

# chmod g+s jobs

or:

# chmod 2775 jobs

See the manpages for 'chmod'.

By the wsy, you presented the permissions for a directory, not a file, although that doesn't matter for the solution.

Regards!

...JRF...
Tim Nelson
Honored Contributor

Re: change mode

chmod 2775 jobs

The suid bit on a directory forces all new files created in the directory to the directories group. In this case bin.

This is different than setting the suid bit on a file, which would give anyone with execute permission to the file to run the file with the group's file permission.


Not really sure why you would want bin, but that is a different topic.
Krisklan
Advisor

Re: change mode

Thanks everybody. It helped!!