On Ubuntu 16.04,

I created a folder and moved some executable files in it. Later, when trying to execute those files from terminal, i got a permission denied error. So I checked folder permissions, like this:

cd <path/to/the>
ls -l ./folder

And got -rw-rw-r-- for each executable in the folder.

I did

sudo chmod ugo-x ./folder

(being completely distracted by the environment) and now the folder has the following permissions: d---------. From the system GUI, folder appears with a cross in the right lower corner and with a lock on the right upper corner. I can't access it (This location cannot be displayed), GUI properties tell me its unreadable.

I did try

sudo chmod ugo-rw ./folder

from the same terminal I used to screw it up and from a new terminal as well.

I was able to recover using system GUI, but not via command-line. What am I doing wrong?


1 Answer 1


Are you using sudo chmod ugo-rw ./folder to add read and write permissions? The minus sign you are writing means that you want to remove those permissions, if you want to add them use a plus instead: sudo chmod ugo+rw ./folder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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