You are not logged in.

#1 2004-12-15 05:21:41

makz
Member
Registered: 2004-12-07
Posts: 27

i can mount dvd as user but cannot read it

I'm trying to read a data dvd as user but i can do it only as root.

my fstab is like that:
/dev/cdroms/cdrom1     /mnt/dvd  udf       ro,user,noauto,unhide   0      0

i can mount it as user with the command mount /mnt/dvd and when i do cd /mnt/dvd i got Permission Denied.

my /etc/group:
optical:!:105:makz (my username is makz)

/mnt/dvd directory permissions (not mounted):
drwxr-xr-x  2 root users 4096 2004-12-14 23:33 /mnt/dvd

/mnt/dvd directory permissions (when mounted)
dr--r--r--  2 4294967295 4294967295 3852 2004-12-14 20:45 /mnt/dvd

/dev/cdroms/cdrom1 permissions:
brw-rw----  1 root optical 22, 0 1969-12-31 18:00 /dev/cdroms/cdrom1

the same as /dev/ide/host0/bus1/target0/lun0/cd (/dev/cdroms/cdrom1 is a symlink to this)
brw-rw----  1 root optical 22, 0 1969-12-31 18:00 /dev/ide/host0/bus1/target0/lun0/cd

/etc/devfsd.conf:
REGISTER ^cdroms/.* PERMISSIONS root.optical 660

this is very strange, i don't know what's heppening because all seems ok.

Offline

#2 2004-12-15 05:50:36

makz
Member
Registered: 2004-12-07
Posts: 27

Re: i can mount dvd as user but cannot read it

I changed my fstab so /mnt/dvd is mounted as a iso9660 filesystem instead of udf and now i can read it as user but the filenames are like this:
_g06d4~1.avi 

instead of

[GF] Gantz 01 DVD-RIP [sin censura] spanish sub DIVX 5.2.avi

do you think this is a bug?

Offline

#3 2004-12-15 06:24:53

Stanislav
Member
Registered: 2004-10-16
Posts: 82

Re: i can mount dvd as user but cannot read it

you can try changing the filesystem to "auto" . maybe this will help.


[URL=http://imageshack.us][img]http://img360.imageshack.us/img360/481/imbulgarian6ph.gif[/img][/URL]

Offline

#4 2004-12-15 06:46:48

makz
Member
Registered: 2004-12-07
Posts: 27

Re: i can mount dvd as user but cannot read it

it didn't work, also i tried with this:
/dev/cdroms/cdrom1     /mnt/dvd  auto       user,uid=root,gid=optical,umask=0,noauto,unhide   0      0
without luck.

Offline

#5 2004-12-15 16:43:01

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: i can mount dvd as user but cannot read it

did you add your user to the optical group?

that is why you cannot mount as user  as far as i know.


AKA uknowme

I am not your friend

Offline

#6 2004-12-15 20:32:48

makz
Member
Registered: 2004-12-07
Posts: 27

Re: i can mount dvd as user but cannot read it

my /etc/group:
optical:!:105:makz (my username is makz)

i _can_ mount it as user, what i _can't_ is read it as user.

Offline

#7 2004-12-15 20:41:30

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: i can mount dvd as user but cannot read it

makz wrote:

I changed my fstab so /mnt/dvd is mounted as a iso9660 filesystem instead of udf and now i can read it as user but the filenames are like this:
_g06d4~1.avi 

instead of

[GF] Gantz 01 DVD-RIP [sin censura] spanish sub DIVX 5.2.avi

do you think this is a bug?

did you burn this in windows? it looks like a DOS 8.3 filename (DOS has a limit of 8 chars - dot - 3 chars)

Offline

#8 2004-12-16 01:26:48

makz
Member
Registered: 2004-12-07
Posts: 27

Re: i can mount dvd as user but cannot read it

yes, a friend of mine burned that in windows.

Offline

#9 2004-12-24 05:06:55

makz
Member
Registered: 2004-12-07
Posts: 27

Re: i can mount dvd as user but cannot read it

i had to manually change the permissions in the source code of the udf module, in the file inode.c, in the convert_permissions function, i changed the value of mode to 511 (777 octal) and now it works but i don't know why.

Offline

#10 2004-12-24 08:58:44

oscar
Member
From: Kiruna, Sweden
Registered: 2004-08-13
Posts: 457

Re: i can mount dvd as user but cannot read it

makz wrote:

it didn't work, also i tried with this:
/dev/cdroms/cdrom1     /mnt/dvd  auto       user,uid=root,gid=optical,umask=0,noauto,unhide   0      0
without luck.

uid and gid specifies that user/group that should have the permissions to access etc the resource when mounted.
If you tell your fstab that only root should own it (yes, that's what your fstab says), it wont work for your user! tongue


To err is human... to really foul up requires the root password.

Offline

#11 2005-03-06 14:08:03

adstro
Member
From: New York, USA
Registered: 2005-03-02
Posts: 3

Re: i can mount dvd as user but cannot read it

Is there another solution to this problem other than changing the code in inode.c.  I am experiencing the same issue.  Users can mount the UDF filesystem but the mounted dir has does not have the execute permissions for users.

Here is what my fstab file says:
dev/cdroms/cdrom0     /mnt/dvdrom  udf      ro,user,noauto,unhide,umask=0222,gid=users

I have tried many variations with no success.  Any input would be appreciated.

Offline

#12 2005-03-06 14:50:55

kakabaratruskia
Member
From: Santiago, Chile
Registered: 2003-08-24
Posts: 596

Re: i can mount dvd as user but cannot read it

To open data dvd's I use the iso9660 filesystem, not udf.

try this:

mount -t iso9660 dev/cdroms/cdrom0 /mnt/dvdrom 

And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.

Offline

#13 2005-03-07 07:53:04

jerem
Member
From: France
Registered: 2005-01-15
Posts: 310

Re: i can mount dvd as user but cannot read it

I also mount my windows-nero-burnt dvds with iso9660 fs and I have no problem with long-names files.

However, I have UTF8 and some other characters encoding sets included in my kernel, which may help.

Offline

#14 2005-08-25 01:06:12

makz
Member
Registered: 2004-12-07
Posts: 27

Re: i can mount dvd as user but cannot read it

Here is the section of inode.c, if someone needs it someday.

udf_convert_permissions(struct fileEntry *fe)
{
        mode_t mode;
        uint32_t permissions;
        uint32_t flags;

        permissions = le32_to_cpu(fe->permissions);
        flags = le16_to_cpu(fe->icbTag.flags);

        udf_info("perm: %d %on", permissions, permissions);

        mode =  (( permissions      ) & S_IRWXO) |
                (( permissions >> 2 ) & S_IRWXG) |
                (( permissions >> 4 ) & S_IRWXU) |
                (( flags & ICBTAG_FLAG_SETUID) ? S_ISUID : 0) |
                (( flags & ICBTAG_FLAG_SETGID) ? S_ISGID : 0) |
                (( flags & ICBTAG_FLAG_STICKY) ? S_ISVTX : 0);

mode = 365;

        return mode;
}

The line changed is the one that says mode = 365, 365 is 555 in octal, you can change this number according to your needs.

i used this converter to convert the permissions to decimal, permissions are an octal number, in this case, 555 (the permissions i wanted) to decimal is 365.

I informed the udf linux project people about this problem some months ago but they didn't give a satisfying answer, i hope this get fixed soon, if the project is not dead.

Offline

Board footer

Powered by FluxBB