How can I modify the write/read/execution permissions of an already-made directory in Linux shell? I need to install libsnd library but the installation gives an error that it failed to create a directory during the process.
chmod u+rwx,g=rx,o-rwx /the/directory/already/existing
Would give the user owning 'existing
' all basic permissions (the plus sign says "additionally to the ones the user has now"), including the write permission, which is needed for creating directories, too. The members's of the group owning that directory will have exactly (=) the rights to read and enter this directory while the rights to read, write and enter the directory are revoked for every other user if they existed so far. (See man chmod
for details).
But from the description of you problem I assume a different problem. Let me guess, you compiled something and now you are trying to install it system wide? Make sure you either switch to the root user prior to issuing make install
using the su
command (see man su
for details) or - even better - execute sudo make install
if sudo is installed (and it should be). The chmod command above will not help you in this case, either, as you would presumably not have write permissions for the directories already
and existing
.