LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-26-2008, 11:18 PM   #1
Ryzol
Member
 
Registered: Jun 2007
Distribution: Ubuntu, Slackware
Posts: 50

Rep: Reputation: 15
really screwy permissions error involving chmod, chgrp, chown


Okay so I was root, mounted a flash drive, and then accidentally copied a file to the flash drive so it inherited the root group's permissions. No big deal I thought, I'll just chmod and chown it to my normal log in. WRONG! Anyways here's the commands/their output I tried after copying that file as root and their output. I ran them as verbose when I could. All these commands were entered by root. The file in question is /media/usb/vimnotes

At the top are the permissions before I try to mess with them, displayed by ls -l. I think you can tell the other commands I ran, if not I'll clarify.

Any ideas what happened? I'm extremely perplexed that chmod 777 as root did not set the permissions correctly.

Code:
mount -w /dev/sda1 /media/usb/ #usb is a symbolic link to usb0
drwxr-xr-x 4 root root 4096 1969-12-31 14:00 /media/usb/
drwxr-xr-x 4 root root 4096 1969-12-31 14:00 /media/usb0/
drwxr-xr-x 2 root root 4096 2008-03-26 02:58 /media/usb1/
-rwxr-xr-x 1 root root 305 2008-03-26 15:35 /media/usb/vimnotes
chown: changing ownership of `/media/usb/vimnotes': Operation not permitted
failed to change ownership of `/media/usb/vimnotes' to jlang:users
mode of `/media/usb/vimnotes' changed to 0777 (rwxrwxrwx) #tried chmod 777 here, no luck
-rwxr-xr-x 1 root root 305 2008-03-26 15:35 /media/usb/vimnotes
failed to change group of `/media/usb/vimnotes' to users
/media/usb/vimnotes: ASCII English text

/etc/mtab
Code:
/dev/hda1 / ext3 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/sda1 /media/usb0 vfat rw 0 0
/etc/fstab
Code:
/dev/hda1 / ext3 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/sda1 /media/usb0 vfat rw 0 0
/dev/hda5        swap             swap        defaults         0   0
/dev/hda1        /                ext3        defaults         1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
 
Old 03-26-2008, 11:36 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Since the file system is vfat it doesn't support Linux file system attributes. You can mount it to belong to a particular user/group or with a umask that allows anyone to write to it. For example:
Code:
/dev/sda1  /mnt/usb  vfat  defaults,umask=0000
Have a look at the man page for mount and search for "mount options for vfat" for more info.
 
  


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
chmod chown permissions not working operation not allowed UMG:Chicken_Soüp Slackware 1 11-06-2007 12:15 AM
Using chown, chgrp, chmod on a vfat partition? Rodolfo Medina Linux - General 7 08-17-2005 08:17 AM
Chmod ,chown ,chgrp commands not working proper---------------- pal Linux - Newbie 12 03-07-2005 09:55 AM
chmod ,chown ,chgrp------------ pal Linux - Newbie 1 02-27-2005 02:49 PM
Graphically setup user permissions (frontend to chmod and chown) sfonvill Linux - Security 2 08-27-2003 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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