LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-02-2007, 11:47 AM   #1
laucian
Member
 
Registered: Oct 2005
Distribution: Ubuntu 9.04
Posts: 124
Blog Entries: 2

Rep: Reputation: 15
changing ownership of a mounted drive


Code:
dyn189:/mnt # mkdir win
dyn189:/mnt # ls
win
dyn189:/mnt # mount -t ntfs /dev/sda1 /mnt/win/

dyn189:/mnt # cd win
dyn189:/mnt/win # l
insgesamt 1572320
dr-x------ 1 root root       4096 31. Okt 18:26 ./
drwxr-xr-x 3 root root       4096  2. Nov 16:42 ../
-r-------- 1 root root          0  6. Aug 13:02 AUTOEXEC.BAT
-r-------- 1 root root        211 31. Okt 18:21 boot.ini
-r-------- 1 root root          0  6. Aug 13:02 CONFIG.SYS

dyn189:/mnt/win # cd ..
dyn189:/mnt # chown -R kerem win
chown: Ändern des Eigentümers von „win/AUTOEXEC.BAT“: Das Dateisystem ist nur lesbar
chown: Ändern des Eigentümers von „win/boot.ini“: Das Dateisystem ist nur lesbar
chown: Ändern des Eigentümers von „win/CONFIG.SYS“: Das Dateisystem ist nur lesbar
I have mounted my windows partition on win directory..it belongs to root and as a normal user i cannot read it. wenn i try to change the ownership of the directory, i am getting an error message saying "filesystem could not be read". how can i deal with it?
 
Old 11-02-2007, 12:10 PM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
I don't think permissions work the same in Linux and Windows... So, chowning files on an NTFS partition doesn't make sense.

Besides that, it looks like the partition is being mounted read-only.
 
Old 11-02-2007, 12:17 PM   #3
laucian
Member
 
Registered: Oct 2005
Distribution: Ubuntu 9.04
Posts: 124
Blog Entries: 2

Original Poster
Rep: Reputation: 15
so..how can i mount it being avaiable for a specified user?
 
Old 11-02-2007, 12:44 PM   #4
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
Unmount the partition, and check the permissions on the mount-point dir... "ls -l /mnt/win". If it's not fully accessible to users, you can change the permission on it with chmod. When you mount it, it should then be readable by users.

As for writing, that's another story. Most distros come with the ability to read an NTFS partition; few come with the ability to write to one. You'd have to search Google, or hope somebody who's done it replies.
 
Old 11-02-2007, 01:14 PM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Try Slax if you want to write on NTFS partitions.

It is shipped with ntfs-3g, will mount every partition you have got, give you the root privilege and allow you to drag and drop files in the desktop exactly as though you are in a MS Windows.
 
Old 11-02-2007, 01:37 PM   #6
dansmith127
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu 7.10
Posts: 21

Rep: Reputation: 15
Which distro are you using? I'm on Ubuntu, had similar problem, solved with ntfs-3g package.

If you do have Ubuntu, search for this package in Synaptic and install it, along with any suggested dependancies. You can then write to ntfs.
 
Old 11-02-2007, 01:50 PM   #7
laucian
Member
 
Registered: Oct 2005
Distribution: Ubuntu 9.04
Posts: 124
Blog Entries: 2

Original Poster
Rep: Reputation: 15
i am using opensuse 10.3
what is ntfs 3g ?
how can i install it?
 
Old 11-02-2007, 01:58 PM   #8
dansmith127
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu 7.10
Posts: 21

Rep: Reputation: 15
It's just a package that allows you to write to ntfs-formatted drives. ntfs is a Windows filesystem, and by default, linux can only read it, not write to it. Installing the ntfs-3g package allows you to write as well as read.

I know nothing about OpenSUSE, so have a look here: http://en.opensuse.org/NTFS
 
Old 11-02-2007, 03:36 PM   #9
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 16
try ...

mount -t ntfs -o uid=yourusername /dev/sda1 /mnt/win/

(or possibly uid=youruid ... don't have an nfs folder to mount right now to check it)

You don't need ntfs3g or any other read-write functionality if you're just trying to read from the partition. ntfs3g is a new-generation linux ntfs driver that has vastly improved support for writing, compared to previous ntfs linux support.

Last edited by complich8; 11-02-2007 at 03:38 PM.
 
Old 11-02-2007, 03:50 PM   #10
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
For reliable read/write support, you really need ntfs-3g. Look through the software manager under Yast, I'm sure you'll find it.

As for permissions, one of the earlier posters was right to point out that permissions under windows do not quite work the way they do under Linux. In order to make it work, you have to put these option in fstab:

defaults,uid=your_user_ID,gid=your_group_ID,umask=0022

So if your uid=1000 and your gid=1000, those are the values that need to be inserted.

I see that Ubuntu does it as simply as this: defaults,umask=007, gid=46 (gid here points to the plugdev group, which includes any users who have permissions to mount/umount disks). It may not be that simple on Suse (it may require some extra editing) so it is probably better to choose the first option.

Last edited by jay73; 11-02-2007 at 03:52 PM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto change the ownership of mounted smb resource?? sys7em Linux - Newbie 4 12-23-2004 03:48 PM
changing the ownership djh Slackware 3 11-08-2004 05:16 AM
3 issues: Making swap, fixing partitions, changing ownership of mounted filesystem. Dunedain Linux - Newbie 2 01-27-2004 04:52 PM
changing access to mounted shared drive shycalais Linux - Newbie 4 11-11-2003 05:13 AM
Changing ownership of mounted filesystem jhansman Red Hat 4 09-11-2003 01:38 AM


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