LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices



Reply
 
Search this Thread
Old 04-05-2007, 12:51 PM   #1
shreef
LQ Newbie
 
Registered: May 2006
Location: Alexandria, Egypt
Distribution: Ubuntu
Posts: 6

Rep: Reputation: 0
Question sudo chown : operation not permited


Hi

I'm a new linux user. I have a problem when trying to chown or chgrp the files on my Ubuntu 6.10.

see this
Code:
ahmed@shreef:/media/hda2$ su - root
Password: 
root@shreef:~# cd /media/hda2
root@shreef:/media/hda2# chown ahmed "my docs"
chown: changing ownership of `my docs': Operation not permitted
also, if I try to chmod 777 the files, I get the files only changed to be 770. it will look like that :

Code:
root@shreef:/media/hda2# ls -l
total 176
drwxrwx---  9 root plugdev 16384 2007-01-21 17:53 cygwin
drwxrwx--- 22 root plugdev 16384 2007-01-20 00:01 Dev tools
drwxrwx---  7 root plugdev 16384 2007-03-03 15:57 e - Library
drwxrwx---  8 root plugdev 16384 2007-04-04 14:13 linux-programs
drwxrwx---  5 root plugdev 16384 2007-02-15 06:15 my docs
drwxrwx---  3 root plugdev 16384 2007-01-20 19:48 Recycled
-rwxrwx---  1 root plugdev    27 2007-03-26 15:58 router.txt
drwxrwx--- 15 root plugdev 16384 2007-02-15 06:20 server
drwxrwx---  3 root plugdev 16384 2007-01-19 08:45 System Volume Information
drwxrwx--- 15 root plugdev 16384 2007-01-19 22:55 win programs

this permissions problem is driving me crazy, I'm trying to compile php and mysql from source, but I always get some errors related to this permissions problem.

thank you

Last edited by shreef; 04-05-2007 at 12:53 PM.
 
Old 04-05-2007, 01:11 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,305

Rep: Reputation: 205Reputation: 205Reputation: 205
How to change files/folders ownership

sudo chown username /location_of_files_or_folders

If you want to change ownership of all containing files and folders recursively, use the -R option like this:

sudo chown -R username /location_of_files_or_folders

How to change files/folders group ownership

sudo chgrp groupname /location_of_files_or_folders

If you want to change group ownership of all containing files and folders recursively, use the -R option like this:

sudo chgrp -R username /location_of_files_or_folders
 
Old 04-05-2007, 01:24 PM   #3
shreef
LQ Newbie
 
Registered: May 2006
Location: Alexandria, Egypt
Distribution: Ubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
I tried all this commands before, but the same problem.

thanks for the Webmin advice .I'm familiar with the CLI, but this can be helpful too.

thanx
 
Old 04-05-2007, 01:57 PM   #4
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,305

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by shreef
I tried all this commands before, but the same problem.

thanks for the Webmin advice .I'm familiar with the CLI, but this can be helpful too.

thanx
Try chown ahmed:ahmed [name of folder] and chgrp ahmed:ahmed [name of folder]

Have allowed for the fact you have a space between my & docs?
 
Old 04-05-2007, 03:24 PM   #5
shreef
LQ Newbie
 
Registered: May 2006
Location: Alexandria, Egypt
Distribution: Ubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
it's the same too

Code:
root@shreef:/media/hda2# chown ahmed:ahmed "my docs"
chown: changing ownership of `my docs': Operation not permitted
I don't think that the space in the name of the folder is the problem as this happens with all the files/folders.

I read before about something called fsktaps and mounting the HD. I don't know if these things are related to this problem. I can read and write to/from my fat32 partitions without problems, but I can't change the permissions of the files/folders even when working as root user. what I understand is that the root user can do every thing whatever it is this thing, but in my case, the root user can't even get in his shoes without help ... lol

thanx
 
Old 04-14-2007, 07:27 AM   #6
shreef
LQ Newbie
 
Registered: May 2006
Location: Alexandria, Egypt
Distribution: Ubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
I have fixed chmod's problem. I found umask=007 for all the partitions in the fstab file. I have changed it to be umask=000 .

the main problem still exists. I can't use chown or chgrp, even if I'm logged as root.

any body met this problem before?

thanx
 
Old 04-14-2007, 12:38 PM   #7
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,776

Rep: Reputation: 66
You can't chown or chmod FAT32 or NTFS partitions. Permissions for Windows partitions are defined only by umask.
 
Old 04-16-2007, 05:31 AM   #8
shreef
LQ Newbie
 
Registered: May 2006
Location: Alexandria, Egypt
Distribution: Ubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
Aha!
yes, after trying, I found that I can only chown my EXT drives. I was afraid that I did something wrong while installing Ubuntu.

thank you aysiu
 
Old 04-19-2007, 04:19 PM   #9
BlackWidower
LQ Newbie
 
Registered: Apr 2007
Location: Canada
Distribution: Fedora 7
Posts: 12

Rep: Reputation: 0
So how can one edit files on a vfat volume in Linux?
 
Old 04-20-2007, 09:58 AM   #10
mkhan919
Member
 
Registered: Jan 2007
Location: Valbonne, France
Distribution: Mandriva 2008 (Free)
Posts: 135

Rep: Reputation: 15
errrrrrrrrr...... i dont think you need to do anything special with vfat. Just mount the partition and you should be able to write data do it. vfat does not require any special driver etc for writing from linux.

If you are unable to write to vfat partition, check the permissions. may be you are mouting the file system as read only. change that to "rw" and you should be all set.
 
Old 04-24-2007, 03:59 PM   #11
BlackWidower
LQ Newbie
 
Registered: Apr 2007
Location: Canada
Distribution: Fedora 7
Posts: 12

Rep: Reputation: 0
let me rephrase...So how can one's user (not root) account edit files on a vfat volume in Linux? Because I tried -o rw
 
Old 04-24-2007, 05:26 PM   #12
mkhan919
Member
 
Registered: Jan 2007
Location: Valbonne, France
Distribution: Mandriva 2008 (Free)
Posts: 135

Rep: Reputation: 15
on my machine this mounts the external hardisk partition sdb2 on /mnt/Temp.
All users can access and write to this partition.


/dev/sdb2 /mnt/Temp auto rw,noexec,nosuid,nodev,sync,user 0 0


Alternatively, you can replace auto with vfat (since you know that the filesystem is vfat).

If this this does not work try this..

/dev/sdb2 /mnt/Temp auto umask=0000,rw,noexec,nosuid,nodev,sync,user 0 0

which is basically the same but with the umask field added. Hope this helps.
 
Old 04-26-2007, 04:29 PM   #13
BlackWidower
LQ Newbie
 
Registered: Apr 2007
Location: Canada
Distribution: Fedora 7
Posts: 12

Rep: Reputation: 0
Ok that is it! I have officially tried everything! I mounted it in a different location, change the parameters, and no matter what I do the directory won't mount rw for users, and the permissions are stuck! sigh...do I need special software?
 
Old 04-26-2007, 04:30 PM   #14
BlackWidower
LQ Newbie
 
Registered: Apr 2007
Location: Canada
Distribution: Fedora 7
Posts: 12

Rep: Reputation: 0
oh btw thanks for your help mkhan!
 
Old 06-13-2007, 10:25 PM   #15
BlackWidower
LQ Newbie
 
Registered: Apr 2007
Location: Canada
Distribution: Fedora 7
Posts: 12

Rep: Reputation: 0
For those who were wondering I fixed my problem. Vfat volumes don't store owner information so Linux automatically assigns it as root. Its not easy to switch data to a different filesystem on the same drive...I lost data in the transfer. :'(
 
  


Reply

Tags
chgrp, chown, sudo


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
sudo problem. Want permission to run a sbin program without a password inverted.gravity Linux - Software 11 03-21-2007 04:34 PM
sudo - permission denied! yogaboy Linux - Newbie 5 12-29-2006 12:58 AM
Tracking user logins that was allowed and not allowed eswanepoel Linux - Security 3 08-02-2006 05:37 AM
sudo permission denied Swift&Smart Slackware 5 07-13-2006 02:05 AM
sudo and smartctl /dev/hda permission problem on Slackware 10.2 emphaze Linux - General 2 06-21-2006 08:47 AM


All times are GMT -5. The time now is 09:27 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration