Skip to main content
3 of 5
added 6 characters in body; edited title
qonf
  • 113
  • 3

transfer permissions user -> group/other

I have some libraries I want to move to opt and set ownership of to root. Unfortunately, permissions are a bit messed up for group and other, and that creates a problem as group and other cannot use the libraries, call the executables and read the files.

I want to recursively set the permissions of write/execute and execute to group and other respectively. For example, i want this:

-rw-r--r--.   1 root root    4464 Jan 11 23:58 CPackSourceConfig.cmake
-rwxr--r--.   9 root root   28672 Jan 11 23:58 executable
drwxr--r--.   9 root root   28672 Jan 11 23:58 Source

, to be this:

-rw-rw-r--.   1 root root    4464 Jan 11 23:58 CPackSourceConfig.cmake
-rwxrwxr-x.   9 root root   28672 Jan 11 23:58 executable
drwxrwxr-x.   9 root root   28672 Jan 11 23:58 Source

. How do I best go about doing this, considering there are quite a number of files/folders(recursive)?

cheers,
qonf

qonf
  • 113
  • 3