Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB Drive works from "command line" but not in KDE
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Atom Smasher
n00b
n00b


Joined: 26 Sep 2003
Posts: 64

PostPosted: Wed Oct 01, 2003 12:58 pm    Post subject: USB Drive works from "command line" but not in KDE Reply with quote

Here is my /etc/fstab file:

Code:
/dev/hdb1               /boot           ext2            noauto,noatime         $
/dev/hdb3               /               reiserfs        noatime                $
/dev/hdb2               none            swap            sw                     $
/dev/hdc                /mnt/dvdrw      iso9660         noauto,user,ro         $
/dev/hdd                /mnt/dvd        iso9660         noauto,user,ro         $
/dev/sda1               /mnt/portable   auto            noauto,user,exec       $



I can cd through the drive and see the stuff on it logged as root. But normal user it gives me this:
Code:
Could not enter directory /mnt/portable

Its a permission thing but which one ??
Back to top
View user's profile Send private message
stim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jan 2003
Posts: 116
Location: Brisbane, Australia

PostPosted: Wed Oct 01, 2003 1:55 pm    Post subject: Reply with quote

If you do a
Code:
ls -l /mnt
it will list all the folders in your /mnt directory and what permissions they have. Here's what I get:
Code:
stim@clipper stim $ ls -l /mnt
total 4
drwxr-xr-x    2 root     root           48 Jun 28 18:34 beos
drwxrwxrwx    2 root     root           48 May 12 00:33 camera
drwx------    2 root     root           72 Jun 23 10:23 cdrom
drwxr-xr-x    2 root     root           48 Apr  6 21:07 cdrom1
drwxr-xr-x    2 root     root           48 Apr  6 21:07 cdrom2
drwxr-xr-x    2 root     root           48 Mar  8  2003 dvdrom
drwx------    2 root     root           72 Sep 16 22:40 floppy
drwxr-xr-x    2 stim     users          48 Mar 10  2003 windows
stim@clipper stim $
You want to make sure that your portable folder had at least x-r for all permission groups (says it three times). To do this type:
Code:
chmod a+rx /mnt/portable
as root. I believe this is actually the bit you were asking about. For a user to change into a directory, they must have read and execute permission.

You should then be able to read from the device as a normal user when you mounted it as a normal user.

Hope that helps.
Back to top
View user's profile Send private message
Atom Smasher
n00b
n00b


Joined: 26 Sep 2003
Posts: 64

PostPosted: Thu Oct 02, 2003 1:55 am    Post subject: Reply with quote

When I try that chmod command above it gives me this.

Code:
bash-2.05b# chmod a+rx /mnt/portable
chmod: changing permissions of `/mnt/portable': Read-only file system


And it still wont let me in as a normal user. The icon that I have on my kde desktop I have the permissions checked.
Code:
bash-2.05b# ls -l /mnt
total 2
drwx------    2 root     root           72 Sep 13 00:18 cdrom
drwxr-xr-x    2 root     root           48 Oct  1 02:03 dvd
drwxr-xr-x    2 root     root           48 Oct  1 02:01 dvdrw
drwx------    2 root     root           72 Sep 25 16:31 floppy
dr-x------    1 root     root        32768 Sep 24 22:34 portable
bash-2.05b#


The filesystem on the portable drive is NTFS from my previous XP install. But root can still access it in both kde and command line.
Back to top
View user's profile Send private message
stim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jan 2003
Posts: 116
Location: Brisbane, Australia

PostPosted: Thu Oct 02, 2003 6:07 am    Post subject: Reply with quote

Hmmm, this seems very odd. I'm not sure that this will help or make any difference whatsoever, but I just wanted to make sure (since I didn't make it clear in my post) that you are issuing the chmod command when the device is not mounted, and that you are mounting the device as a normal user.

If your system allows you to mount the device as a normal user, but not cd into it .... then I'll have to think about that.
Back to top
View user's profile Send private message
Atom Smasher
n00b
n00b


Joined: 26 Sep 2003
Posts: 64

PostPosted: Thu Oct 02, 2003 12:25 pm    Post subject: Reply with quote

Hey,

I made sure the portable drive was not mounted while logged in as root. Then I logged back in as normal user, issued the
Code:
chmod a+rx /mnt/portable


and it gives me
Code:
chmod: changing permissions of ' /mnt/portable ' : Operation not permitted.


But like I said, as root it all works fine. This Linux stuff makes my head hurt.
Thanks for your help though.
Back to top
View user's profile Send private message
stim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jan 2003
Posts: 116
Location: Brisbane, Australia

PostPosted: Thu Oct 02, 2003 1:11 pm    Post subject: Reply with quote

Hi,

I think you're not understanding me properly (or I'm not explaining well enough, I'm usually not very good with explanations). You need to issue the chmod command as root, when the device is not mounted. Then you need to mount the device as a normal user and see what happens.

When I say "need" above, I'm not saying it's going to work, but I have a feeling it should help. Does it?
Back to top
View user's profile Send private message
Atom Smasher
n00b
n00b


Joined: 26 Sep 2003
Posts: 64

PostPosted: Thu Oct 02, 2003 9:39 pm    Post subject: Reply with quote

OK...here we go...

These are the steps I took. I think I did it like you were saying.
bobby is a normal user

Code:

bobby@desktop bobby $ su
Password:
root@desktop bobby # chmod a+rw /mnt/portable
root@desktop mnt # ll
bash: ll: command not found
root@desktop mnt # exit
exit
bobby@desktop bobby $ cd /mnt
bobby@desktop mnt $ ll
total 3
drwx------    2 root     root           72 Sep 13 00:18 cdrom
drwxr-xr-x    2 root     root           48 Oct  1 02:03 dvd
drwxr-xr-x    2 root     root           48 Oct  1 02:01 dvdrw
drwx------    2 root     root           72 Sep 25 16:31 floppy
drwxrwxrwx    2 root     root           48 Oct  1 04:44 portable
bobby@desktop mnt $ mount portable
bobby@desktop mnt $ ll
total 2
drwx------    2 root     root           72 Sep 13 00:18 cdrom
drwxr-xr-x    2 root     root           48 Oct  1 02:03 dvd
drwxr-xr-x    2 root     root           48 Oct  1 02:01 dvdrw
drwx------    2 root     root           72 Sep 25 16:31 floppy
dr-x------    1 root     root        32768 Sep 24 22:34 portable
bobby@desktop mnt $ cd portable
-bash: cd: portable: Permission denied
bobby@desktop mnt $



It wouldn't let me ll as root ?? Is that normal ?

Current fstab is
Code:
/dev/sda1               /mnt/portable   auto            noauto,user,exec        0 0
Back to top
View user's profile Send private message
ibliss
n00b
n00b


Joined: 07 May 2003
Posts: 14

PostPosted: Fri Oct 03, 2003 7:26 am    Post subject: Reply with quote

man mount gives the following info:

Code:
Mount options for ntfs
       iocharset=name
              Character  set to use when returning file names.  Unlike VFAT, NTFS suppresses names that contain uncon
              vertible characters.

       utf8   Use UTF-8 for converting file names.

       uni_xlate=[0|1|2]
              For 0 (or `no' or `false'), do not use escape sequences for unknown Unicode characters.  For 1 (or `yes'
              or  `true')  or 2, use vfat-style 4-byte escape sequences starting with ":". Here 2 give a little-endian
              encoding and 1 a byteswapped bigendian encoding.

       posix=[0|1]
              If enabled (posix=1), the file system distinguishes between upper and lower case. The  8.3  alias  names
              are presented as hard links instead of being suppressed.

       uid=value, gid=value and umask=value
              Set  the file permission on the filesystem.  By default, the files are owned by root and not readable by
              somebody else.


especially the last section is interesting -> play a bit with these values, and you should be able to read the filesystem as non-root ;)
Back to top
View user's profile Send private message
yemu
Guru
Guru


Joined: 05 Jun 2003
Posts: 342
Location: /poland/warsaw

PostPosted: Mon Oct 06, 2003 9:28 pm    Post subject: Reply with quote

in fstab i've got:

Code:

/dev/sda1/      /mnt/pendrive   vfat   noauto,user,rw,gid=1001, umask=000      0 0


and it works perfectly

group 100 is users, my user id is 1000

best
yemu
_________________
Centrum Jêzyka Francuskiego VOILA - http://www.voila.edu.pl
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum