Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I change my user rights from rwx to r-x at the group level? I'm trying to ensure that I cannot touch any data belonging to other users when I am developing and debugging my scripts. Once I've verified my scripts work correctly I want to go back to rwx to run my scripts in production mode. However, I have no specific sudo/root rights

share|improve this question
To clarify, you want to make it so you can't write to any files owned by your group (but not by you), even if the group write bit is set? – Michael Mrozek Apr 23 '13 at 19:42

On modern Unices, only the file owner is allowed to change the file mode. There were some historic Unices that had a feature called "group superuser", but this no longer exists in any modern Unix that I know of.

The only way to do this would be to have a setuid program that checks your group memberships, and allows you to chmod if you match the file's group.

share|improve this answer

If this worried, set up a user and use that one to do tests. Might have a script in your home that copies/links some nice files/directories for the playground into the new user's $HOME. If you want to fool around, do su - testuser, run the script to set up things (if the last round blew everything away, that is), and test away. Might have a terminal open for the testuser.

Just take care not to confuse the terminals. A much-remembered classic here was a very loud OOPS... "somebody" had rebooted, not his machine but in the ssh session to our central server. On Wednesday afternoon, database homework was due that night. Can't tell you how much fun we had that day...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.