LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Suddenly permissions are unknown? (https://www.linuxquestions.org/questions/linux-software-2/suddenly-permissions-are-unknown-752438/)

GTBlackwell 09-03-2009 11:45 AM

Suddenly permissions are unknown?
 
I recently upgraded my system to Ubuntu 9.04. Everything was going fine until I installed the Mythweb plugin. All of a sudden, all my recording have been labeled "Override recording -- Don't record". I did some digging and discovered the permissions on my TV storage directory look like this:

Code:

...
-????????? ? ? ? ?                ? 4054_20090820220000.mpg
-????????? ? ? ? ?                ? 4054_20090820220000.mpg.png
-????????? ? ? ? ?                ? 4054_20090820223000.mpg
-????????? ? ? ? ?                ? 4054_20090820223000.mpg.png
-????????? ? ? ? ?                ? 4067_20090626180000.mpg
-????????? ? ? ? ?                ? 4067_20090626180000.mpg.png
-????????? ? ? ? ?                ? 4087_20090713112500.mpg.png
d????????? ? ? ? ?                ? Live
d????????? ? ? ? ?                ? lost+found
d????????? ? ? ? ?                ? Movies
d????????? ? ? ? ?                ? News

and mythtv-setup says the directory is not writable and that the subdirectories don't exist. I ran:

Code:

sudo chown -R mythtv:mythtv /TV
with no effect.

I can see the file permissions when I run ls as root:
Code:

$ sudo ls -l /TV
...
-rw-rw-r--  1 mythtv mythtv 2331447296 2009-08-31 19:52 4067_20090626180000.mpg
-rw-rw-r--  1 mythtv mythtv    111805 2009-08-31 19:52 4067_20090626180000.mpg.png
-rw-rw-r--  1 mythtv mythtv    110331 2009-08-31 19:52 4087_20090713112500.mpg.png
drw-rw-r--  2 mythtv mythtv      4096 2009-09-02 20:36 Live
drw-rw-r--  2 mythtv mythtv      16384 2009-08-31 18:56 lost+found
drw-rw-r-- 28 mythtv mythtv      4096 2009-08-31 20:42 Movies
drw-rw-r--  2 mythtv mythtv      4096 2009-09-02 20:38 News

but using Nautilus i get an empty directory and Myth still says the directories are not writable. I have never encountered this before. Even if I change the ownership to myusername, I am unable to cd into the /TV directory and the permissions appear as question marks. I used mythweb before and this was not a problem. What happened?

duggla 09-03-2009 01:53 PM

Missing permission on directories:
 
Hi GTBlackwell,

Your problem is straightforward, but how it came about may not be.

In Linux/Unix, a directory's permissions are interpreted a little differently than those of a standard data file.

Read permission lets you see the names of the files in the directory (that is, the contents of the directory inode itself) but does not by itself let you read the files. Write permission lets you create files (put a new filename, etc. into the directory inode) but does not by itself let you put any content into the file you have created.

To actually access the files pointed to by the directory you need execute permission to the directory itself. (In the Windows world, this corresponds to the "directory traversal" permission, which you can have even if you do not have read permissions to the directory....)

In general, regardless of the ownership, a directory will be world-executable as well as world-readable. Try "chmod - R 755" on /TV. (Quick and dirty) The user mythtv will, of course, need write permissions as well.

The more serious problem is what changed to cause the default permissions on the created directories to be incorrect, and I hope someone else can be of more help there.

duggla


All times are GMT -5. The time now is 03:24 PM.