LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 06-26-2007, 09:22 PM   #1
mhg
Member
 
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Rep: Reputation: 30
sorry, another change ownership issue


Hi All,

Playing around with LinuxMint now, and trying to figure out how to change ownership on folders/partitions.

I have tried chown, and tried to edit /etc/fstab, but I am obviously still doing something wrong.

chown gets me nothing.

Here is my fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb6
UUID=5bf78acd-b39e-4388-814a-7ca65f50b177 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
UUID=07D4-0203 /media/sda1 vfat defaults,utf8,umask=007,gid=46 0 1
# /dev/sda2
UUID=40E8E421E8E41746 /media/sda2 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
# /dev/sda5
UUID=7AA48CF7A48CB763 /media/sda5 ntfs defaults,nls=utf8,umask=0,gid=46 0 1
# /dev/sda6
UUID=8E40396B40395B63 /media/sda6 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
# /dev/sda7
UUID=861CB7F01CB7D97F /media/sda7 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
# /dev/sdb2
UUID=890ae9a2-9ce7-477f-8038-cdcc8d31b59f /media/sdb2 ext3 defaults 0 2
# /dev/sdb5
UUID=9b663705-8a60-43f1-bd72-dd0345b00bce /media/sdb5 ext3 defaults 0 2
# /dev/sdb1
UUID=725d89cc-15e0-4a98-ba92-56832bd13e85 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto 0 0

I have been working on one drive only, so picked /media/sda5, and changed umask from 007, to 0, and saved the edit.

I have spent about an hour and a half searching google/linux, and forums, but still can not get it right.

The only folders I own are the ones I created during install.

Thanks for any help.
 
Old 06-26-2007, 09:33 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Quote:
Originally Posted by mhg
and trying to figure out how to change ownership on folders/partitions
umask doesn't affect ownership. It affects rwx permissions.

What you need to look into are the "user", "users", and (I think) "uid" options. You can read up on them with the mount man page.
 
Old 06-26-2007, 09:34 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
To change the ownership of a fat32 (vfat) partition, use the "uid=" and "gid=" mount options. You can use either a name or the corresponding UID number. You can't use chown or chgrp for a vfat partition. Also, the permissions of all files will be the same. The permissions of all of the directories will be the same as well.

I recently added an entry to my /etc/fstab file to mount a pen drive this way:
Code:
UUID=3B69-1AFD /mnt/cr256 vfat rw,nosuid,nodev,noatime,noauto,flush,user,uid=jschiwal,utf8,shortname=lower,fmask=177,dmask=077
The "user" option lets me mount the drive as a normal user. The "noauto" prevents it from being mounted when booting. You want to use this for external drives. Use the "auto" option instead for an internal drive. The umask and dmask options effect the rwx permissions. See the man page for the mount command for more information.

Last edited by jschiwal; 06-26-2007 at 09:35 PM.
 
Old 06-27-2007, 05:11 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Quote:
Originally Posted by jschiwal
You can't use chown or chgrp for a vfat partition.
And the reason for this is simple:
VFAT is a filesystem that simply can't store user credentials on file/directory level.
Hence, your chown will fail, as the filesystem can't modify a value that isn't stored.

Your only way of modifying access to VFAT drives is through the mount options (ie in /etc/fstab), which basically apply
to the entire mounted filesystem, so to all files.
 
Old 06-27-2007, 06:23 PM   #5
mhg
Member
 
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Original Poster
Rep: Reputation: 30
Thanks for the replies.

All these partitions, except the ext3, are ntfs.

So I need to find out how to mount these directories using /etc/fstab then? And make those changes permanent.

As I say, I have had very bad luck finding instructions that work for that.

I will go back to the Ubuntu WIKI and see if I can get anymore clues there. I know I am missing a piece of the puzzle still.

Thanks for the help.
 
Old 06-27-2007, 07:50 PM   #6
mhg
Member
 
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Original Poster
Rep: Reputation: 30
am I getting close?

I did a google/linux for etc/fstab, and found useful info, but after editing /etc/fstab, I still get the message "you are not the owner, so you can not change the permissions".

This is what my fstab looks like:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb6
UUID=5bf78acd-b39e-4388-814a-7ca65f50b177 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
UUID=07D4-0203 /media/sda1 vfat defaults,utf8,umask=007,gid=46 0 1
# /dev/sda2
UUID=40E8E421E8E41746 /media/sda2 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
# /dev/sda5
/media/sda5 /mnt/ntfs ntfs default 0 0
# /dev/sda6
UUID=8E40396B40395B63 /media/sda6 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
# /dev/sda7
UUID=861CB7F01CB7D97F /media/sda7 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
# /dev/sdb2
UUID=890ae9a2-9ce7-477f-8038-cdcc8d31b59f /media/sdb2 ext3 defaults 0 2
# /dev/sdb5
UUID=9b663705-8a60-43f1-bd72-dd0345b00bce /media/sdb5 ext3 defaults 0 2
# /dev/sdb1
UUID=725d89cc-15e0-4a98-ba92-56832bd13e85 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto 0 0



I have been working on my /dev/sda5.

I changed it from this:
UUID=7AA48CF7A48CB763 /media/sda5 ntfs defaults,nls=utf8,umask=0,gid=46 0 1

to what you see above:
/media/sda5 /mnt/ntfs ntfs default 0 0

I used the mkdir command to create the directory /mnt/ntfs.
/media/sda5 is what the path reads when I browse to that partition.

I thought I was getting close. Can you tell me where I am going wrong?

Thanks for any help.
 
Old 06-27-2007, 08:11 PM   #7
mhg
Member
 
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Original Poster
Rep: Reputation: 30
quick update

Well I changed something!

I can see /media/sda5, and get the message that I am not the owner, but when I open the directory, it is now empty.

Thanks
 
Old 06-28-2007, 01:54 AM   #8
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Support in Linux for writing to NTFS partitions has been doubtful for quite some time. So you should check
out relevant web sites on NTFS support in Linux for clues. I'm guessing you'll need a kernel module or something like that.
 
Old 06-28-2007, 07:20 PM   #9
mhg
Member
 
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Original Poster
Rep: Reputation: 30
sorry for your time and troubles

Sorry for wasting your time.

Somehow my ntfs config got messed up. Once I started it up, and configured again, I was fine.

I am still not the owner, which I don't get, but I can read and write to all my ntfs directories, which is all I need for now.

Thanks for the help.
 
Old 06-29-2007, 01:57 AM   #10
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
You're not wasting our time. Your questions are reasonable and we voluntarily spend time to help you.
 
  


Reply



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
Cannot change ownership jamaso Slackware 11 11-08-2010 11:01 AM
change ownership script paul_mat Linux - Software 3 04-07-2006 07:59 PM
Change ownership apffal SUSE / openSUSE 1 11-09-2005 02:08 AM
unable to change ownership arjunjeyaprakash Linux - Newbie 12 09-06-2005 02:02 PM
change ownership Johng Linux - General 4 04-06-2004 02:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:10 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