LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-19-2003, 12:35 AM   #1
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Rep: Reputation: 30
Permission problems when mounting hd0


When I mount hd0 (my windows disk), I have to mount it as root, so I do. But then, I can't get to it with my normal account. How can I be able to access this drive as my normal account? I am using a NTFS filesystem on hd0, which is only currently capable of read-only modes. So when I try to change the permissions the normal way (right-click, properties), it says it cannot change the settings because the drive's mount folder is read-only.
 
Old 03-19-2003, 01:00 AM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Re: Permission problems when mounting hd0

Quote:
Originally posted by orange400
When I mount hd0 (my windows disk), I have to mount it as root, so I do. But then, I can't get to it with my normal account. How can I be able to access this drive as my normal account? I am using a NTFS filesystem on hd0, which is only currently capable of read-only modes. So when I try to change the permissions the normal way (right-click, properties), it says it cannot change the settings because the drive's mount folder is read-only.
you have to edit the properties of the folder where you have mounted your windows partition
suppose that windows is mounted at /mnt/c
now to check whether it has the correct permission
do
umount /mnt/c
ls -halR /mn
 
Old 03-19-2003, 01:04 AM   #3
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Re: Permission problems when mounting hd0

Quote:
Originally posted by orange400
When I mount hd0 (my windows disk), I have to mount it as root, so I do. But then, I can't get to it with my normal account. How can I be able to access this drive as my normal account? I am using a NTFS filesystem on hd0, which is only currently capable of read-only modes. So when I try to change the permissions the normal way (right-click, properties), it says it cannot change the settings because the drive's mount folder is read-only.
you have to edit the properties of the folder where you have mounted your windows partition
suppose that windows is mounted at /mnt/c
now to check whether it has the correct permission
do
umount /mnt/c
ls -halR /mnt/c
and look at the permission of .( and not of ..)
it should be something like
drw_rw_rw_
if it is not so
do a
chmod 666 /mnt/c
now mount your partition again
mount -a
it should work now
keep posted
 
Old 03-20-2003, 12:58 AM   #4
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
It still says Permission denied.

[root@localhost orange400]# ls -halR /mnt/windows
/mnt/windows:
total 8.0K
drwxr-xr-x 2 root root 4.0K Mar 2 21:10 .
drwxr-xr-x 6 root root 4.0K Mar 8 12:23 ..
[root@localhost orange400]# chmod 666 /mnt/windows
[root@localhost orange400]# ls -halR /mnt/windows
/mnt/windows:
total 8.0K
drw-rw-rw- 2 root root 4.0K Mar 2 21:10 .
drwxr-xr-x 6 root root 4.0K Mar 8 12:23 ..
[root@localhost windows]# su orange400
[orange400@localhost windows]$ cd ../
[orange400@localhost mnt]$ cd windows
bash: cd: windows: Permission denied
[orange400@localhost mnt]$

I would like to keep windows a read-only filesystem too, the write mode is very risky right now ...
 
Old 03-20-2003, 02:41 AM   #5
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Quote:
Originally posted by orange400
It still says Permission denied.

[root@localhost orange400]# ls -halR /mnt/windows
/mnt/windows:
total 8.0K
drwxr-xr-x 2 root root 4.0K Mar 2 21:10 .
drwxr-xr-x 6 root root 4.0K Mar 8 12:23 ..
[root@localhost orange400]# chmod 666 /mnt/windows
[root@localhost orange400]# ls -halR /mnt/windows
/mnt/windows:
total 8.0K
drw-rw-rw- 2 root root 4.0K Mar 2 21:10 .
drwxr-xr-x 6 root root 4.0K Mar 8 12:23 ..
[root@localhost windows]# su orange400
[orange400@localhost windows]$ cd ../
[orange400@localhost mnt]$ cd windows
bash: cd: windows: Permission denied
[orange400@localhost mnt]$

I would like to keep windows a read-only filesystem too, the write mode is very risky right now ...
give the content of your fstab file
 
Old 03-20-2003, 03:07 AM   #6
JayCnrs
Member
 
Registered: Mar 2003
Location: Winnipeg
Distribution: Suse 9.3 Pro
Posts: 404

Rep: Reputation: 30
All you have to do is add this to your /etc/fstab file:

/dev/hd0 /mnt/XP ntfs umask=0227,uid=root,gid=username 0 0

I would use this command mkdir /mnt/XP which creates the dir XP

That's it and when you boot up Linux it automatically mounts your Windows partition.

Have Fun
 
Old 03-20-2003, 03:11 AM   #7
JayCnrs
Member
 
Registered: Mar 2003
Location: Winnipeg
Distribution: Suse 9.3 Pro
Posts: 404

Rep: Reputation: 30
Don't put mkdir /mnt/XP in your fstab file sorry if that caused some confusion, its time for bed.

Umask sets your permissions on the XP dir to allow root and anybody belonging to your group permission to enter the Windows partition.

Good Night till tomorrow
 
Old 03-20-2003, 01:24 PM   #8
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
umask? That's exactly what I'm looking for! I'm going to try that when I get back from school ...
 
Old 03-21-2003, 12:21 AM   #9
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
it didn't work. During the bootup, it said [FAILED]. It said that there was a bad fs option, bad superblock, too many mounted filesystems ... of coarse not all of them, but it was the error message description. This has happened ever since I tried chmod 66 /mnt/windows. Is there any way to restore that?
 
Old 03-21-2003, 12:47 AM   #10
JayCnrs
Member
 
Registered: Mar 2003
Location: Winnipeg
Distribution: Suse 9.3 Pro
Posts: 404

Rep: Reputation: 30
Maybe you can do what I did,

I made a group called xp, then I made sure that I belonged to this group.
Then insert this in your fstab file
[b]/dev/hd0(a couple spaces) /mnt/XP(space) ntfs(space) umask=0227,uid=root,gid=xp(space) 0(space) 0

The spaces are really important of course don't type space just leave a couple spaces so that fstab can tell these are under different columns.

Good Luck
 
Old 03-21-2003, 01:08 AM   #11
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
I did, I put that in, but it doesn't work. It's that chmod 666 setting (kind of a weird number). It has messed up my drive mountings so I can't mount my hdd. rch, help!
 
Old 03-21-2003, 01:29 AM   #12
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
Well I fixed the 666 thing, on to fstab!
 
Old 03-21-2003, 01:31 AM   #13
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Quote:
Originally posted by orange400
I did, I put that in, but it doesn't work. It's that chmod 666 setting (kind of a weird number). It has messed up my drive mountings so I can't mount my hdd. rch, help!
i will explain what this 666 means
rw_rw_rw=110110110(binary)=666
owner-group-others(in that order)
now i asked you to give your /etc/fstab file but you did not
so add(or modify) your /etc/fstab to include::
/dev/hda1 /mnt/windows ntfs users,default 0 0
i am assuming that your windows partition is /dev/hda1
(you can find out whether it is so by typing fdisk -l)
and your windows filesystem is ntfs
once the option is specified as users
everyone can mount your windows partition
 
Old 03-21-2003, 01:32 AM   #14
JayCnrs
Member
 
Registered: Mar 2003
Location: Winnipeg
Distribution: Suse 9.3 Pro
Posts: 404

Rep: Reputation: 30
This link might help you find your way through this:

Linux NTFS project

Follow the instructions after the download files, it talks about permisions and such.

Good Luck
 
Old 03-23-2003, 03:48 AM   #15
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
Sorry rch, I was skimming and I skipped your request. However, my fstab is being modified very frequently, trying different things to get it to work, so I don't think it's useful ... I'm going to try the users command in fstab ...
 
  


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
Mounting and permission trouble. spitfire999 Linux - Newbie 5 03-28-2005 05:53 PM
mounting sd cards - permission problem Veteq Linux - Software 1 01-19-2005 07:21 PM
problem mounting DVD - permission denied dgitelman Linux - General 7 09-07-2004 03:10 PM
NFS mounting : Permission denied Bahador Linux - Networking 3 07-18-2003 05:33 AM
permission denied when mounting nfs directory keirobyn Linux - Networking 3 01-29-2002 01:43 AM

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

All times are GMT -5. The time now is 12:49 PM.

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
Open Source Consulting | Domain Registration