Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ Users cannot access folder, only root

Posted by: NiceLittleRabbit May 31 2012, 12:41 AM

Hello,

I have been having a very strange (for me) issue with my Debian server.

There is a folder (Data), located onto another hard drive, with what seem correct rights to me, which only allows access to root.

Here come some screenshots:

First, just doing "ls" from "/"

CODE
debian:/home3# ls -l
total 256
drwxr-x--- 120 john family   4096 May 31 07:15 Family
lrwxrwxrwx   1 john Data       6 Mar 29  2011 Data -> /Data
drwxr-xr-x  30 john humor 237568 May 30 17:30 Humor
drwx------   2 root  root     4096 Dec  5  2009 lost+found
drwxr-x--- 153 john docs   12288 May 24 18:05 docs
debian:/home3#


Then, entering into Data as root:

CODE
debian:/home3/Data# ls -l
total 20
drwxr-x--- 4 john Data  4096 Nov 11  2010 Data
drwxr-x--- 2 root  root  16384 Mar  1  2011 lost+found
debian:/home3/Data#


Then, Entering again into Data:

CODE
debian:/home3/Data/Data# ls -l
total 8
drwxr-x--- 9 john Data 4096 Apr 24 20:31 Data
drwxr-x--- 2 root  root  4096 May 21  2010 lost+found
debian:/home3/Data/Data#


And then, if I enter into Data again all my data shows up.

The problem starts at the first level "/".

Here comes a screenshot when I try to enter /Data as a normal user:

CODE
john@debian:/$ cd Data/
bash: cd: Data/: Permission denied
john@debian:/$


I know the path is weird, that's something that happened during a restore of the server and I have never understood why that was so, but it used to work anyways and I did not have time to dig into it. However, now no user can enter the /Data folder and it is more worrying.

Does anyone have any idea why that may be so?

Thank you in advance

Posted by: mogwin Nov 21 2012, 03:03 PM

It looks like your first ls command was run in the /home3 directory rather than in /

So, there is a link called /home3/Data which points at /Data. The permissions on the link are open, but the actual directory does not have required execute permissions to allow regular users to navigate to it.

As a first step, you can try:
chmod a+x /Data

Depending on how many levels of data directories there are, you may also need:
chmod a+x /Data/Data
chmod a+x /Data/Data/Data

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)