I am new in Linux machine. I was zapping into various centOs scripts, and I was wondering if there is a way to modify files with different users without any "Permission Denied" error. I tried to create a group and then assigned a certain number of users into it. But it doesn't work.
Could you just advise me the best way to do it?
The user you are trying to edit the file with must have write access permissions to the file.
I would suggest you to read the man page of chmod
command:
chmod changes the file mode bits of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new mode bits.
Here are some examples that might help you :
chmod +rwx filename to add permissions.
chmod -rwx directoryname to remove permissions.
chmod +x filename to allow executable permissions.
chmod -wx filename to take out write and executable permissions.