Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
04-05-2007, 11:51 AM
|
#1
|
LQ Newbie
Registered: May 2006
Location: Alexandria, Egypt
Distribution: Ubuntu
Posts: 6
Rep:
|
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 11:53 AM.
|
|
|
04-05-2007, 12:11 PM
|
#2
|
Senior Member
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313
|
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
|
|
|
04-05-2007, 12:24 PM
|
#3
|
LQ Newbie
Registered: May 2006
Location: Alexandria, Egypt
Distribution: Ubuntu
Posts: 6
Original Poster
Rep:
|
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
|
|
|
04-05-2007, 12:57 PM
|
#4
|
Senior Member
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313
|
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?
|
|
|
04-05-2007, 02:24 PM
|
#5
|
LQ Newbie
Registered: May 2006
Location: Alexandria, Egypt
Distribution: Ubuntu
Posts: 6
Original Poster
Rep:
|
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
|
|
|
04-14-2007, 06:27 AM
|
#6
|
LQ Newbie
Registered: May 2006
Location: Alexandria, Egypt
Distribution: Ubuntu
Posts: 6
Original Poster
Rep:
|
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
|
|
|
04-14-2007, 11:38 AM
|
#7
|
Senior Member
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775
Rep:
|
You can't chown or chmod FAT32 or NTFS partitions. Permissions for Windows partitions are defined only by umask.
|
|
|
04-16-2007, 04:31 AM
|
#8
|
LQ Newbie
Registered: May 2006
Location: Alexandria, Egypt
Distribution: Ubuntu
Posts: 6
Original Poster
Rep:
|
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
|
|
|
04-19-2007, 03:19 PM
|
#9
|
LQ Newbie
Registered: Apr 2007
Location: Canada
Distribution: Fedora 7
Posts: 12
Rep:
|
So how can one edit files on a vfat volume in Linux?
|
|
|
04-20-2007, 08:58 AM
|
#10
|
Member
Registered: Jan 2007
Location: Valbonne, France
Distribution: Mandriva 2008 (Free)
Posts: 135
Rep:
|
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.
|
|
|
04-24-2007, 02:59 PM
|
#11
|
LQ Newbie
Registered: Apr 2007
Location: Canada
Distribution: Fedora 7
Posts: 12
Rep:
|
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
|
|
|
04-24-2007, 04:26 PM
|
#12
|
Member
Registered: Jan 2007
Location: Valbonne, France
Distribution: Mandriva 2008 (Free)
Posts: 135
Rep:
|
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.
|
|
|
04-26-2007, 03:29 PM
|
#13
|
LQ Newbie
Registered: Apr 2007
Location: Canada
Distribution: Fedora 7
Posts: 12
Rep:
|
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?
|
|
|
04-26-2007, 03:30 PM
|
#14
|
LQ Newbie
Registered: Apr 2007
Location: Canada
Distribution: Fedora 7
Posts: 12
Rep:
|
oh btw thanks for your help mkhan!
|
|
|
06-13-2007, 09:25 PM
|
#15
|
LQ Newbie
Registered: Apr 2007
Location: Canada
Distribution: Fedora 7
Posts: 12
Rep:
|
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. :'(
|
|
|
All times are GMT -5. The time now is 08:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|