Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-30-2014, 07:24 PM
|
#1
|
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983
|
permissions error need help
on my web server I was uploading some of my school work so I and my classmates would have access to them. while changing the default permissions to what I thought was better, 644, something happened and now I can no longer modify that directory. can not rm -rf, chmod files in the directory, but can chmod the directory.
Code:
-????????? ? ? ? ? ? hw_3_1.c
-????????? ? ? ? ? ? hw_3_2.c
that is the ls -laF of the directory. how in the world do i fix that?
FYI i do not have root access to this server.
I have full permissions to the parent directory.
i currently have set the directory as follows:
Code:
dr-------- 2 user user 4096 Jul 26 03:27 EGN-3211-C-Programming/
help is greatly appreciated. ty
|
|
|
07-30-2014, 07:31 PM
|
#2
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
.. ignore
Last edited by szboardstretcher; 07-30-2014 at 07:39 PM.
|
|
|
07-30-2014, 07:36 PM
|
#3
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,315
|
Quote:
Originally Posted by lleb
on my web server I was uploading some of my school work so I and my classmates would have access to them. while changing the default permissions to what I thought was better, 644, something happened and now I can no longer modify that directory. can not rm -rf, chmod files in the directory, but can chmod the directory.
Code:
-????????? ? ? ? ? ? hw_3_1.c
-????????? ? ? ? ? ? hw_3_2.c
that is the ls -laF of the directory. how in the world do i fix that?
FYI i do not have root access to this server.
I have full permissions to the parent directory.
i currently have set the directory as follows:
Code:
dr-------- 2 user user 4096 Jul 26 03:27 EGN-3211-C-Programming/
help is greatly appreciated. ty
|
That is normally the result of the directory not having "execute" permission bit set.
To fix it you need to be sure that each directory in the path has execute permission. Execute permission on a directory under *nix actually means that the user can navigate, or traverse the directory.
To fix it, simply chmod +x on the directory itself (and any parents).
Last edited by astrogeek; 07-30-2014 at 07:53 PM.
|
|
1 members found this post helpful.
|
07-30-2014, 07:36 PM
|
#4
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,315
|
Quote:
Originally Posted by lleb
on my web server I was uploading some of my school work so I and my classmates would have access to them. while changing the default permissions to what I thought was better, 644, something happened and now I can no longer modify that directory. can not rm -rf, chmod files in the directory, but can chmod the directory.
Code:
-????????? ? ? ? ? ? hw_3_1.c
-????????? ? ? ? ? ? hw_3_2.c
that is the ls -laF of the directory. how in the world do i fix that?
FYI i do not have root access to this server.
I have full permissions to the parent directory.
i currently have set the directory as follows:
Code:
dr-------- 2 user user 4096 Jul 26 03:27 EGN-3211-C-Programming/
help is greatly appreciated. ty
|
That is normally the result of the directory not having "execute" permission bit set.
To fix it you need to be sure that each directory in the path has execute permission. Execute permission on a directory under *nix actually means that the user can navigate, or traverse the directory.
To fix it, simply chmod +x on the directory itself (and any parents).
Last edited by astrogeek; 07-30-2014 at 07:53 PM.
|
|
1 members found this post helpful.
|
07-30-2014, 07:55 PM
|
#5
|
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983
Original Poster
|
Quote:
Originally Posted by astrogeek
That is normally the result of the directory not having "execute" permission bit set.
To fix it you need to be sure that each directory in the path has execute permission. Execute permission on a directory under *nix actually means that the user can navigate, or traverse the directory.
To fix it, simply chmod +x on the directory itself.
|
that did the trick, but im not sure i want to leave the +x on that directory as its full of uncompiled C programs.
is that safe on a web server?
|
|
|
07-30-2014, 08:00 PM
|
#6
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,315
|
Quote:
Originally Posted by lleb
that did the trick, but im not sure i want to leave the +x on that directory as its full of uncompiled C programs.
is that safe on a web server?
|
It is safe (and necessary) for the directory itself. You should chmod -x the files within the directory to prevent trying to execute them.
Having read but not traversal (i.e. execute) on a directory means that you can see the files, but you can't see their attributes, hence the ????'s. It is confusing becaues we still call it 'x' but on a directory it does not mean execute, it means traversal.
We usually learn this after we do a chmod -R -x (or some such)... down some path... we all do it! 
Last edited by astrogeek; 07-30-2014 at 08:06 PM.
|
|
1 members found this post helpful.
|
07-30-2014, 08:08 PM
|
#7
|
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983
Original Poster
|
yup thats exactly what i did, well chmod -R 644 is what I set, then poof ????????? all over the place  .
|
|
|
07-30-2014, 08:10 PM
|
#8
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,315
|
Quote:
Originally Posted by lleb
yup thats exactly what i did, well chmod -R 644 is what I set, then poof ????????? all over the place  .
|
Been there (more than once!)  - stops you dead in your tracks!
Using find . -type f exec chmod -x {} is the best way around that.
Glad it works now!
Last edited by astrogeek; 07-30-2014 at 08:15 PM.
|
|
|
All times are GMT -5. The time now is 06:09 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|