Click to See Complete Forum and Search --> : Cannot Change Permissions/DHCLIENT for all users


SCLinux
03-02-2003, 03:10 AM
Hello All,

Ive been able to actually get somewhere with Linux the last few days and have been havin a blast but Ive run into several roadblocks in the last day or so so I thought id post these questions. I searched the forums but was unable to find a solution :-(

1. Im trying to change the permissions of my /mnt/data/downloads folder but I keep getting the following error

chmod: changing permissions of `/mnt/data/downloads' (requested: 0777, actual: 0755): Operation not permitted

" I cant even change the permissions logged in as root "

The only idea I have is I am using files in this directory but I also get this error on files that are not being used. can anyone help me change these permissions so any user can put files in this folder. So far I have tried chmod 777 -R /downloads and chmod 777 * in the folder.

2. Another short ? I didnt want to create a new thread for is how can I get all users to run /sbin/dhclient as all users but root get a permission denied error.

Any help would be greatly appreciated.

Thanks :confused:

chrism01
03-02-2003, 03:17 PM
1. sounds odd; try
man chattr
may help.

2. Try
chmod o+rx /sbin/dhclient
assuming you don't have prob as in (1) above.

sharth
03-02-2003, 03:25 PM
chmod u+s /sbin/dhclient should do that.

and for /mnt/data/downloads, what filesystem type, and what is the output of /etc/fstab

SCLinux
03-02-2003, 11:50 PM
I was able to edit the permissions on the dhclient and get it to work for other clients so thanks everyone for the help.

As for access to the file system here is the output of the fstab. Hopefuly its something simple I did wrong. I did recently edit the fstab to automount my hda7 partition :-(


Output of Fstab

LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda6 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0
0
/SWAP swap swap defaults 0 0
/dev/hda7 /mnt/data vfat defaults 0 0

Thanks

sharth
03-03-2003, 06:30 PM
Just as i thought :) It's a vfat partition. Vfat as a file system does not support permissions. However, fstab (and mount) make the entire partition get the same values for the permissions of ALL files in it. add in the options like for it umask=0777 for global read write execute access to the ENTIRE partition.

SCLinux
03-03-2003, 08:46 PM
I thought it was something to do with what I did in my fstab :-(

To be honest I am unsure as how to

add in the options like for it umask=0777 for global read write execute access to the ENTIRE partition.

Can some one explain how I can add this into my FSTAB file and allow write permissions on this partition?

Thanks

sharth
03-03-2003, 10:16 PM
/dev/hda7 /mnt/data vfat umask=0777 0 0

SCLinux
03-04-2003, 04:37 AM
Hey All,

I was able to edit the fstab to contain the line umask=0777 and I am still unable to use this partition. When I go to a web page for example then save a pic I get "you do not have permission necessary to view these files". This partion was mounted after I made the change to fstab. I have also tried to change the permissions on the /mnt/data partition as root and I get

chmod: changing permissions of `data' (requested: 0777, actual: 0000): Operation not permitted

Anyone have any ideas as to how I can save files unto this partition?

Thanks

sharth
03-04-2003, 01:03 PM
Well, let's just check something real quicklike.

umount /mnt/data
mount /mnt/data
mount

<and post here the output of mount please.>

SCLinux
03-05-2003, 04:29 AM
Sorry for the long output but here is the info you are looking for


[paquino@redzangief paquino]$ ls
di713P_firmware_260b6a.zip
[paquino@redzangief paquino]$ cp di713P_firmware_260b6a.zip /mnt/data
cp: cannot stat `/mnt/data/di713P_firmware_260b6a.zip': Permission denied
[paquino@redzangief paquino]$ mount
/dev/hda5 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
/dev/hda7 on /mnt/data type vfat (rw,umask=0777)
[paquino@redzangief paquino]$
[paquino@redzangief paquino]$
[paquino@redzangief paquino]$
[paquino@redzangief paquino]$ umount
Usage: umount [-hV]
umount -a [-f] [-r] [-n] [-v] [-t vfstypes] [-O opts]
umount [-f] [-r] [-n] [-v] special | node...
[paquino@redzangief paquino]$ umount /mnt/data
umount: only 0???7??? can unmount /dev/hda7 from /mnt/data
[paquino@redzangief paquino]$ su -c umount /mnt/data
su: user /mnt/data does not exist
[paquino@redzangief paquino]$ su
Password:
[root@redzangief paquino]# umount /mnt/data
[root@redzangief paquino]#
[root@redzangief paquino]#
[root@redzangief paquino]# mount /mnt/data
[root@redzangief paquino]#
[root@redzangief paquino]#
[root@redzangief paquino]# mount
/dev/hda5 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
/dev/hda7 on /mnt/data type vfat (rw,umask=0777)
[root@redzangief paquino]# ls
di713P_firmware_260b6a.zip
[root@redzangief paquino]# cp di713P_firmware_260b6a.zip /mnt/data
cp: overwrite `/mnt/data/di713P_firmware_260b6a.zip'? y
[root@redzangief paquino]#

I was able to copy a file from the command line but through a browser I still get you dont have permission? Any ideas.

Thanks

sharth
03-05-2003, 05:39 PM
hmm... I have no idea why the browser would be doing that. But it seems to be a problem with the browser, not the mounting of the partition. Check google, and check bug reports, but atleast we have the partition mounted correctly.

SCLinux
03-05-2003, 05:43 PM
Sounds good to me. The fact that I can copy files to the partition at this time is good enough for me. As long as I can get files unto it somehow then its all good. One question I had though was why when the automount function occurs I cannot write to the partition but when I manually mount the partition I can copy the file in the above output? Maybe im doing something wrong with the automount function of linux but ill get my hands on the HOW to for AutoFS and do the research.

Thanks