November 21, 2024, 10:25:22 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Sorry, user is not allowed to execute '/bin/mkdir 1' as root on localhost  (Read 19361 times)

Offline sunnysthakur

  • Linux Noob !
  • *
  • Posts: 10
Hello,

I created a user who should have rights to work under /opt/lampp/htdocs directory. This directory is having below rights.

drwxr-xr-x 184 deploy deploy 12288 Dec  3 17:42 htdocs

i created a user deploy which belongs to deploy group
uid=502(deploy) gid=502(deploy) groups=502(deploy) context=root:system_r:hotplug_t:SystemLow-SystemHigh

but now when user deploy going to create any directory/files under /opt/lampp/htdocs, is giving the below error

Sorry, user is not deploy allowed to execute '/bin/mkdir 1' as root on localhost

Please let me know how to fix this.

Thanks,
Sunny

Offline dalek

  • LST CareTaker
  • Crescent
  • *****
  • Posts: 243
Re: Sorry, user is not allowed to execute '/bin/mkdir 1' as root on localhost
« Reply #1 on: September 08, 2012, 09:41:04 PM »
Well, it has to be one of a few things.  Permissions for the command itself, which I think would result in another error.  Command is not in the users path.  Last that I can think of, something to do with the way it is mounted.  So,  I would do a:

Code: [Select]
ls -al /bin/mkdir
That would be assuming that mkdir is in /bin on your system.   Then I would type in as that user:

Code: [Select]
/bin/mkdi
then hit tab twice.  If that command is in your path, it should auto complete the whole command and add the "r" on the end.  Then if all else fails, check out how the partition the directory is on is mounted.  Just type in mount and look at the list.  I would look for something obvious like mounted ro, read only, or something like that.  If you use uuid's or something, make sure those are OK too. I don't use those so no idea what is correct or not but know they can mess things up when not set correctly. 

If none of that works, I'm clueless.  So, I hope that helps. 

 :)   :)