-   Linux - Newbie (
-   -   using chmod to change file permission (

kiwidoc 07-24-2004 09:45 PM

using chmod to change file permission
I'm using Mandrake 10 with KDE as the GUI. I want to allow all users to run hcfpciconfig, so change to su and run chmod and get the following output

[root@localhost sbin]# chmod +x hcfpciconfig -v
mode of `hcfpciconfig' changed to 0555 (r-xr-xr-x)
I then run ls and get
[root@localhost sbin]# ls -l hcfpciconfig
-r-xr-xr-x 1 root root 52699 Jul 16 03:32 hcfpciconfig*
which I think means that all users should be able to execute hcfpciconfig

But if I change back to an ordinary user, I get
[david@localhost sbin]$ ls -v hcfpciconfig
and can't run hcfpciconfig unless I change to su again...

What am I doing wrong...?

win32sux 07-24-2004 09:55 PM

Re: using chmod to change file permission

Originally posted by kiwidoc

[david@localhost sbin]$ ls -v hcfpciconfig

what are you doing there??? why not use "-l" to see the permissions??

do you get some kinda error when you try to run the prog as a normal user??

are you specifying the path to it when running it as a normal user???

you should have to, as /usr/sbin shouldn't be in your normal user's path...

if you're gonna execute it as a normal user from the current directory without having it in your path you need to do a "./" before the executable, for example ./hcfpciconfig

kiwidoc 07-25-2004 05:51 AM

Thanks - I need to run hcfpciconfig to avoid a "modem is busy' error when using kppp. The /usr/sbin directory is where the package installed to. Ive tried running it from the directory and by ./hcfpciconfig, still require to login as root to run it.

max_sipos 07-25-2004 06:39 AM

If it still doesn't work with the executable flag set for all users, then it probably needs root privileges to run. You need to set the setuid flag, I think it's chmod o+x . This will tell the system to start the program as if root started it. Do note that this is a security risk.


Maksim Sipos

All times are GMT -5. The time now is 08:53 AM.