Is there anyway to change the permissions of a file in Linux without using the chmod command ?
feedback
|
|
Remember, with umask, the value is subtracted from 777. So if you want a file to have 777 permissions for example:
| |||||
feedback
|
|
You can do it automatically with the umask command. Other than that, I'm not sure I understand the question. How many ways do you need to change file permissions? | |||
|
feedback
|
|
The obvious response to that question would be another question: WHY? But for the sake of whatever, you could change your current umask, make a copy of the file, delete the file and finally rename the copy to match the original. UPDATE: Note that this will only work changing the current permissions to more restrictive ones. The other way does not seem to work. | |||||||
feedback
|
|
I guess you could use what ever Filemanager is installed with your Desktop GUI, if there is one installed. If you right click on a file or directory, there should be an entry like "Properties" or something like that. That should produce a window, where you can change the rights and see some other infos. | |||
|
feedback
|
|
Any program is going to use the chmod() family of system calls (see When you use the cp command, you are creating another file -- you are copying it. So those umask examples are not changing the permissions on a file. | |||||||
feedback
|
