linux – cd into directory without having permission

linux – cd into directory without having permission

@user812954s answer was quite helpful, except I had to do this this in two steps:

sudo su
cd directory

Then, to exit out of super user mode, just type exit.

Enter super user mode, and cd into the directory that you are not permissioned to go into. Sudo requires administrator password.

sudo su
cd directory

linux – cd into directory without having permission

If it is a directory you own, grant yourself access to it:

chmod u+rx,go-w openfire

That grants you permission to use the directory and the files in it (x) and to list the files that are in it (r); it also denies group and others write permission on the directory, which is usually correct (though sometimes you may want to allow group to create files in your directory – but consider using the sticky bit on the directory if you do).

If it is someone elses directory, youll probably need some help from the owner to change the permissions so that you can access it (or youll need help from root to change the permissions for you).

Leave a Reply

Your email address will not be published.