LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-10-2005, 12:26 AM   #1
m_lp_ql_m
Member
 
Registered: Dec 2003
Location: So Cal
Distribution: Debian Etch
Posts: 59

Rep: Reputation: 15
Help me read hdb & sda from desktop icon


I'm using Debian Sarge, kernel 2.6.8-1-686, KDE 3.3.
I'd like to create a desktop icon that I can click on to mount and read my second hard drive "hdb" and my USB drive "sda" partitions while logged in as a user. I create a "hdb1" folder in my "/mnt" directory, add the line
Code:
/dev/hdb1       /mnt/hdb1       ntfs    rw,user,auto    0       0
to /etc/fstab. Then I right click on my desktop, Create new -> Device -> Hard Disk Device. On the "Device" tab, I set device to /dev/hdb1. When I click on it, I get an error message "Could not enter folder /mnt/hdb1." What am I doing wrong? Is it a permissions thing? I was able to do this this way many moons ago under Debian Woody. Help!
 
Old 01-10-2005, 12:49 AM   #2
Razze
Member
 
Registered: Dec 2004
Location: Espoo, Finland
Distribution: Gentoo, 2.6.16-gentoo-r11
Posts: 108

Rep: Reputation: 15
Hello!

To me it sounds like a permissions issue. Have you set the permissions on /mnt/hdb1 so that the user has at least execute rights to the folder?

Code:
chmod ugo+x /mnt/hdb1
Good luck!

Razze
 
Old 01-10-2005, 12:51 AM   #3
m_lp_ql_m
Member
 
Registered: Dec 2003
Location: So Cal
Distribution: Debian Etch
Posts: 59

Original Poster
Rep: Reputation: 15
BTW, I am able to do a "# fdisk /dev/hdb" and "# fdisk /dev/sda" successfully from a terminal prompt, logged in as "su", so the disks are being detected.
 
Old 01-10-2005, 01:26 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
You can use the fmask and dmask options for ntfs partitions. For example,

Code:
/dev/hda1 /mnt/windows ntfs -o ro,user,fmask=0333,dmask=0222,nls=utf8
In this example, I have masked out the wx bits for files (fmask=0333) since the file system is read-only. Also for security reasons, I restrict where files can by executed. For directories, I just masked out the w bit. The 'x' bit allows one to enter a directory.

The nls=utf8 allows reading filenames containing non-english characters.
Here is a webpage which explains mounting the NTFS file-system.
http://linux-ntfs.sourceforge.net/info/ntfs.html

Last edited by jschiwal; 01-10-2005 at 01:28 AM.
 
Old 01-11-2005, 12:53 AM   #5
m_lp_ql_m
Member
 
Registered: Dec 2003
Location: So Cal
Distribution: Debian Etch
Posts: 59

Original Poster
Rep: Reputation: 15
Razze & jschiwal- neither thing worked- any other ideas? Here's what my fstab looks like, if that's any help (both solutions are #'ed out here, but I did try them seperately):
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda5       /home           ext3    defaults        0       2
/dev/hda6       /usr            ext3    defaults        0       2
/dev/hda7       none            swap    sw              0       0
/dev/hdd        /media/cdrom0   iso9660 ro,users,noauto  0       0
/dev/hdc        /media/cdrom1   iso9660 ro,users,noauto  0       0
/dev/fd0        /media/floppy0  vfat    rw,user,noauto  0       0
#/dev/hdb1       /mnt/hdb1       ntfs    rw,user,auto           0       0

#/dev/hdb1       /mnt/hdb1       ntfs    -o ro,user,fmask=0333,dmask=0222,nls=utf8
 
Old 01-11-2005, 01:32 AM   #6
m_lp_ql_m
Member
 
Registered: Dec 2003
Location: So Cal
Distribution: Debian Etch
Posts: 59

Original Poster
Rep: Reputation: 15
Ok, I did some fudging around and noticed that
1)if I log into X and KDE as root, or if I log into a Konsole in SU mode, I AM able to access my hdb partitions, so it looks like a permissions issue. Even if I create the /hdb1 directory within the /mnt directory, it still gives me "could not enter folder /mnt/hdb1" when I try to access it logged in as a user. It shows up as mounted, however, and says that it's busy when I try to unmount.
2)I'm able to access my sda drive fine as user. Could it be because it's vfat?

Sigh, why is Linux so good?
 
Old 01-12-2005, 01:38 AM   #7
m_lp_ql_m
Member
 
Registered: Dec 2003
Location: So Cal
Distribution: Debian Etch
Posts: 59

Original Poster
Rep: Reputation: 15
Ah! I got it! In the interest of completeness, and the possibility of helping someone else, the trick was not to blindly copy jshiwal's code into my fstab. The link he so kindly supplied was really the help. Now my fstab reads
Code:
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda5       /home           ext3    defaults        0       2
/dev/hda6       /usr            ext3    defaults        0       2
/dev/hda7       none            swap    sw              0       0
/dev/hda8       /mnt/hda8       ntfs    ro,users,auto,fmask=0333,dmask=0222,nls=utf8    0       0
/dev/hda9       /mnt/hda9       ntfs    ro,users,auto,fmask=0333,dmask=0222,nls=utf8    0       0
/dev/hda10      /mnt/hda10      ntfs    ro,users,auto,fmask=0333,dmask=0222,nls=utf8    0       0
/dev/hda11      /mnt/hda11      ntfs    ro,users,auto,fmask=0333,dmask=0222,nls=utf8    0       0
/dev/hdb1       /mnt/hdb1       ntfs    ro,users,auto,fmask=0333,dmask=0222,nls=utf8    0       0
/dev/hdb2       /mnt/hdb2       ntfs    ro,users,auto,fmask=0333,dmask=0222,nls=utf8    0       0
/dev/hdb3       /mnt/hdb3       ntfs    ro,users,auto,fmask=0333,dmask=0222,nls=utf8    0       0
/dev/hdb4       /mnt/hdb4       ntfs    ro,users,auto,fmask=0333,dmask=0222,nls=utf8    0       0
and it works! Thanks!
 
Old 08-31-2005, 09:19 AM   #8
odin123
Member
 
Registered: May 2002
Location: Lebanon
Distribution: PCLinuxOS
Posts: 80

Rep: Reputation: 15
Solved!

Hi all,

Had the same problem and tried everything in vain. I probably missed something, but here is what I did to have it finally work:

(using Debian Sarge, by the way)

1. Be sure to be member of the “users” group;

2. Open /etc/fstab and add, next to the file system and mount point:

ntfs ro,users,auto,umask=000


Hope this helps!
 
  


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
2 Gnome questions, mount desktop icon & launch notification McCloud Debian 3 07-02-2007 10:01 PM
fdisk unable to read /dev/sda frankie_DJ Slackware 1 09-08-2005 09:44 PM
hda and hdb automounts nicely, but sda does not Navyblue Linux - Newbie 7 08-21-2005 12:53 PM
/dev/hdb cannot be read Bauhaus Red Hat 1 11-08-2004 08:23 AM
Trash, Computer & user's home icon changed to read-only tuxrules Fedora 1 08-12-2004 04:49 PM

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

All times are GMT -5. The time now is 01:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration