allow user to run script located in /bin

tecwithquestion

Well-Known Member
Oct 20, 2014
61
1
58
cPanel Access Level
Root Administrator
Hello

I have placed my script in /usr/bin folder but when I try to run that script as user. I am getting error permission denied.

I have set chmod u+x to file but its not working.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
I have placed my script in /usr/bin folder but when I try to run that script as user. I am getting error permission denied.
Hello,

Could you provide some more information about this script and why it's added to that directory? What's it's purpose?

Thank you.
 

sysdop

Member
Sep 10, 2017
18
1
3
International
cPanel Access Level
Root Administrator
Hello !

Can I allow users to run chmod user.nobody for public_html folder
By locating the script in the "bin" or "sbin" directory you will not be able to start automatically with the system, you have to create an "init" or add a command line to crontab. With the script having permissions 7777 can be executed by any user via console regardless of everything. Hosting the script in the running public_html is a death threat.
 

tecwithquestion

Well-Known Member
Oct 20, 2014
61
1
58
cPanel Access Level
Root Administrator
Hello !

I dont want to start it automatically.

I just want user should be able to fix permissions at his end. Is it possible that user can set permissions for public_html at his end ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
I just want user should be able to fix permissions at his end. Is it possible that user can set permissions for public_html at his end ?
No, attempting to update ownership to another user while logged in via SSH or FTP as the account username is not permitted. EX:

Code:
$ chown test123.nobody /home/test123/public_html
chown: changing ownership of ‘/home/test123/public_html’: Operation not permitted
You must be logged in as "root" to make this change.

Thank you.