Jump to content

cannot change ownership [solved]


solarian
 Share

Recommended Posts

Hi!

 

I have a mounted FAT partition at /mnt/fat

and the ownership of that dir after a fresh Mandriva install is root

 

All would be good, but, when I try (as root) to change the ownership to user, it doesn't allow me that.

It doesn't even allow me to change permissions with chmod too!!

 

[root@localhost fat]# chown username /mnt/fat
chown: changing ownership of `/mnt/fat': Operation not permitted

 

When I try to do this through Konqueror I get this ->

Could not modify the ownership of file /mnt/fat. You have insufficient access to the file to perform the change.

 

If I copy a file from /mnt/fat to another partition, I can change the permissions and ownership with no problems then,

but I can not do that while the file is located in /mnt/fat

 

 

 

:help::wall:

Edited by solarian
Link to comment
Share on other sites

If you unmount it, and then change the permissions on the /mnt/fat directory, does it make it work any better when you remount it again afterwards?

 

Just a thought.....

 

edit:

 

One other thing I noticed when using Gentoo once, was that I had problems accessing an ntfs filesystem once and it was due to incorrect entries in /etc/fstab which was stopping me from doing something.

 

It could be this also, if some settings aren't set correctly here, which are preventing you to gain access. Although in my case, I could always access it as root, I just could never do it as a normal user until I modified /etc/fstab.

Link to comment
Share on other sites

Thanks for the suggestion,

I'll try mounting/unmounting it.

 

==========

That's strange, I get "error unmounting /mnt/fat

device or resource busy"

 

I'll try it sometime later after a restart.

 

If all fails I'll just backup my backups (meh_) and reformat the partition to ext3 (there's a long story why it's a fat)

Link to comment
Share on other sites

Yep, just umount it, change your etc/fstab so it would be mounted at startup by user, and then remount it...

You cannot set file/folder ownership on vfat or ntfs filesystems.

 

How do I set it to be mounted by user?

This is my fstab entry

/dev/hdc1 /mnt/fat vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

Link to comment
Share on other sites

This is from my CD-ROM line, but you can see the format:

 

/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-15,codepage=850,noauto,ro,exec,users 0 0

 

I think it's the users just before the 0 0 at the end you need to add. I know you're not mounting CD-ROM, but the format still applies, at least I'm pretty sure it does.

Link to comment
Share on other sites

"users" allows for any user to mount it. "user" allows any user to mount it, but sets the user who mounts it in mtab so that only that user can unmount it. here's the relevant manpage info on the two:

user

Allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount the file system again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).

users

Allow every user to mount and unmount the file system. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).

'man fstab' will explain things further. here's my line for my fat fs (this is an external usb drive):

/dev/sda1			   /media/VANTEC		   vfat	user,exec,noauto,noatime		0 0

as you can see i have the "user" flag. noauto means it doesn't mount on boot.

 

it's best to not mount windows partitions at boot and do it manually when you need it, imho. this way you don't go accidental borking your windows system (or, someone else doesn't bork it for you)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...