LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 02-22-2002, 03:54 PM   #1
Sathe
Member
 
Registered: Sep 2001
Location: Bryan, Ohio USA (Home of the Etch-A Sketch)
Distribution: RedHat 7.1, 7.2, and 7.3
Posts: 76

Rep: Reputation: 15
chown


i am trying to change permissions on my mp3 file folder under linux and i keep getting an "Operation Not Permitted" error

Files are all owned by root and are in the root group, however when i log in as root and try to change it, thats when i get the errors

these are vfat partions that i have manually loaded in the fstab
here is my config line in fstab

/dev/hdd1 /mnt/mp3 vfat user,owner,exec,dev,umask=0,suid.rw 0 0

also, for some reason i can rename some files and not others.

does this have anything to do with it being a vfat partition?
and is there a way around it?

Thanks for any help.
 
Old 02-22-2002, 04:12 PM   #2
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
How EXACTLY are you trying to change the folder? Changeing the ownership with chown or changing permissions with chmod? You should be able to set the permissions and ownership on a fat partition. It doesn't actually change anything in the partition, just how users access it. If you are trying (as root) to change ownership of the folder and everything in it you would:
chown -R root.groupname [foldername]
That should work for the folder and anything in it including directories etc...
If you want the permissions to change you wanna use chmod and set the user, group and other flags as desired. For example:
chmod ug=rw,o=r [file or foldername] or chmod 0664 [foldername].
Same thing, if these don't work, you may want to re-assess how your fstab is mounting the partition at startup to a more generic one like: /dev/hdd1 /mnt/mp3 vfat defaults 1 0
 
Old 08-24-2002, 12:54 PM   #3
vose
Member
 
Registered: Aug 2002
Location: tennessee
Distribution: gentoo
Posts: 39

Rep: Reputation: 15
chown

I have a simillar problem (redhat x86 7.3). fstab line is

/dev/hdd1 /home/dpaddy/Fat vfat users 0 0

Files in vfat partition (owned by root) do not have their ownership changed by chown. .. chown (executed by root) gives "Operation not permitted" error!

I thought that unmounting and then remounting while root might help, but the umount command doen not work either. The man page says the inability of umount to function is a feature when the "device is busy", which is the message i get .

HOWEVER, short of rebooting the system I don't know how I can make the devide unbusy (I have, as far as I can tell, closed every application except a window in which to execute the umount command, and I am not in any directory of the vfat parition while executing umount as root).

I would like to begin with understand what is going on, and then move on to understanding how to disable/circumvent "features" of linux--like those above--that interfere with getting work done.

Any help would be greatly appreciated.

Michael (aka "clueless")

P.S. Re the political remark about micro$haft: I am sympathetic with that point of view, but my experience is that windows does work right out of the box (for the most part); I wish it were the same for linux.
 
Old 08-24-2002, 01:09 PM   #4
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Ok you are missing some points:
1. Windows is unaware of linux permission theme
2. If you want execute commands on windows partition you need to put in your /etc/fstab option exec
/dev/hda1 /mnt/windows vfat exec,defaults 0 0
If you want non-root users access the windows partition you can enable it by adding another option to/etc/fstab - user
/dev/hda1 /mnt/windows vfat user,exec,defaults 0 0
If you want an ability to write to windows partiton (NTFS write support is experimential and dangerous in linux !!!) you must add yet another option - umask=000
/dev/hda1 /mnt/windows vfat umask=000,user,exec,defaults 0 0
As for device busy run as root
fuser -vm /mnt/windows
see what occupies windows partition.
Everything works out if and only if the mount point for windows is /mnt/windows, the partiton you are trying to access is FAT32 (fstab bit).

Last edited by neo77777; 08-24-2002 at 01:11 PM.
 
Old 08-24-2002, 02:30 PM   #5
vose
Member
 
Registered: Aug 2002
Location: tennessee
Distribution: gentoo
Posts: 39

Rep: Reputation: 15
chown

I installed everything on the linux 7.3 disks (which I bought, boxed, from redhat). However, attempting to execute fuser gives "command not found" .

Anyhow, I changed the mount point in fstab to /mnt/windows, I added the options (umask=000,user,exec,defaults), I rebooted, I tried chown, and it (chown) does not work (mount and umount are ok
though).

Does anyone know how to change ownership some other way (since
chown does not work)?

Maybe it would be possible to write some C program that would set bits on the disk in order to change the ownership... any pointers
about how to access and write the appropriate bits? How would
I locate the bits that need changing? I am beginning to get
desparate.

Michael (aka "clueless")
 
Old 08-24-2002, 08:06 PM   #6
rverlander
Member
 
Registered: May 2002
Distribution: A few
Posts: 488

Rep: Reputation: 30
You can't chown or chmod stuff in /dev, stuff in /dev is not access to files
You needa mount it then chown/chmod that
 
Old 08-24-2002, 10:57 PM   #7
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
I repeat it again windows isn't aware of linux permission scheme as well as linux doesn't extend its permission theme on windows partitions. What user option gives you besides an ability to mount is that mounted partition becomes this user's user space with permissions extended to this particular user, umask option gives you the ritght to create and view files on windows partitions with "permissions" masked by umask, exec option tells linux that it is OK to execute any programs that reside on that partition.
 
Old 08-25-2002, 10:03 AM   #8
ShawnD
Member
 
Registered: Jul 2002
Distribution: Mandrake 8.2
Posts: 127

Rep: Reputation: 15
woops i misread this topic, i'm sorry

Last edited by ShawnD; 08-25-2002 at 10:04 AM.
 
Old 08-25-2002, 01:23 PM   #9
klickibunti
LQ Newbie
 
Registered: Aug 2002
Distribution: Red Hat Psyche
Posts: 18

Rep: Reputation: 0
fuser and lsof are incluedet in Red Hat 7.3 - make a su -, thene your root password and execute the command
 
Old 08-27-2002, 10:38 PM   #10
vose
Member
 
Registered: Aug 2002
Location: tennessee
Distribution: gentoo
Posts: 39

Rep: Reputation: 15
Maybe I'm catching on...

Despite the fact that "ls -l" lists owners for files in the vfat partition, it---the ls command---is lying about ownership because there is
no concept of ownership in a vfat partition, right? OR, maybe
there really is a concept of ownership, but it is a degenerate concept in the sense that the only possible owner is the default owner and that default owner must necessarily be root?

Is one of the above correct? Which, and if neither, then how are things really?
 
Old 10-13-2002, 06:51 PM   #11
wpennington
Member
 
Registered: Oct 2002
Location: San Diego, CA
Distribution: Mandriva Corporate Desktop
Posts: 51

Rep: Reputation: 15
I changed my /etc/fstab to

/dev/hda1 /mnt/windows vfat umask=000,user,exec defaults 00

I saved the file in vi, and then picked the file titled "test" to change in the directory
/mnt/windows/wp

-rwxr-xr-x 1 root root 0 Oct 13 14:38 test*

# chown wp test
chown: changing ownership of `test': Operation not permitted

I still cannot modify the ownership or save documents in /mnt/windows.

What am I missing?

Thanks,
Walt
 
Old 10-14-2002, 09:55 AM   #12
vose
Member
 
Registered: Aug 2002
Location: tennessee
Distribution: gentoo
Posts: 39

Rep: Reputation: 15
chown

I might not have this quite right, but at this stage my
"understanding" is that gnu/linux does support concepts
of permission and ownership on windows partitions...
the catch is that, from a user's point of view, it is
severly broken (perhaps there are "good" reasons for
that, "features" usually have some sort of justification!).

Anyhow, the catch is that ownerships and permissions
can only be set at mount time, and remain in effect
without the possibility of being changed until the partition
is unmounted (subsequently mounted with different options).
Moreover, defaults specified at mount time apply to the
entire partition, so you have no fine grain control over
individual files within the partition.

The options I currently use on the vfat partition are
users,exec,dev,suid,umask=0000,uid=501,gid=501 0 0

 
Old 10-14-2002, 12:22 PM   #13
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Quote:
Originally posted by wpennington
I changed my /etc/fstab to

/dev/hda1 /mnt/windows vfat umask=000,user,exec defaults 00

I saved the file in vi, and then picked the file titled "test" to change in the directory
/mnt/windows/wp

-rwxr-xr-x 1 root root 0 Oct 13 14:38 test*

# chown wp test
chown: changing ownership of `test': Operation not permitted

I still cannot modify the ownership or save documents in /mnt/windows.

What am I missing?

Thanks,
Walt
Remove the "defaults" there in your line. 2 problems with it:
defaults means:
Quote:
Straight from the mount man:
defaults
Use default options: rw, suid, dev, exec,
auto, nouser, and async.
So if you are specifying things that are contrary to those entries, then default with argue with them, and I don't know which will win, but it's probably better to specify what you want if it's not default.

The other problem, you don't have it comma seperated. It looks like it's taking place of the 5th category, which is your fsck line, which is looking for a number anyway.

HTH

Cool
 
Old 10-14-2002, 12:25 PM   #14
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
OH and I noticed 2 other things:

You do have to be root to chown, but you have to colon seperate your user:group so:
chown user:group /what/ever/you/want

If you want them to have all files and subfiles of the folder then add the -R:
chown -R user:group /whatever/you/want

And 2:
You need to umount and remount the drive after making changes in your fstab.


Cool

Last edited by MasterC; 10-14-2002 at 12:26 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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chown loopoo Linux - Newbie 5 08-09-2005 10:38 AM
Chown -R Jakeh2k1 Linux - General 3 10-31-2004 05:23 PM
chown issues tsayles21 Linux - Newbie 1 03-30-2004 09:10 AM
chown -R ujotne Programming 3 02-25-2004 01:02 PM
chown? joetec Linux - Newbie 6 04-07-2002 05:46 AM

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

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