LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 07-30-2014, 07:24 PM   #1
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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
 
Old 07-30-2014, 07:31 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
.. ignore

Last edited by szboardstretcher; 07-30-2014 at 07:39 PM.
 
Old 07-30-2014, 07:36 PM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,315
Blog Entries: 24

Rep: Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267
Quote:
Originally Posted by lleb View Post
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.
Old 07-30-2014, 07:36 PM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,315
Blog Entries: 24

Rep: Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267
Quote:
Originally Posted by lleb View Post
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.
Old 07-30-2014, 07:55 PM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Original Poster
Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by astrogeek View Post
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?
 
Old 07-30-2014, 08:00 PM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,315
Blog Entries: 24

Rep: Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267
Quote:
Originally Posted by lleb View Post
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.
Old 07-30-2014, 08:08 PM   #7
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Original Poster
Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
yup thats exactly what i did, well chmod -R 644 is what I set, then poof ????????? all over the place .
 
Old 07-30-2014, 08:10 PM   #8
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,315
Blog Entries: 24

Rep: Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267Reputation: 4267
Quote:
Originally Posted by lleb View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
funionfs permissions error Touch Linux - Software 0 05-26-2011 02:38 PM
[SOLVED] Permissions error with NFS amishtechie Linux - Server 2 01-02-2010 05:20 PM
K3B Permissions Error carlosinfl Linux - Software 2 02-12-2006 04:48 PM
gnumeric permissions error linux_pioneer Linux - Software 0 08-09-2003 07:13 AM
Permissions Error ?rwxr--r-- DMB Linux - General 5 07-02-2002 02:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration