file permissions and sshfs
Hi,probably not right forum,but not sure where to put it in.Its sort of security.
I want to use sshfs to run a program from a central server on remote boxes.That works fine.I mounted the file system of the server,using sshfs and i can see the file and execute it,but i dont want any of the users on the remote boxes to be able to read the file,in other words,just execute it.On the remote box,here's the settings Code:
chmod 711 file But,if i log in as test on the box and do a vim file,i can read it.How can I get this user to be able to execute the file(its a php script) but not be able to read it,in other words see the source code? Thanks |
711 means that the *OWNER* (usergroup here) can read it but no one else, root can always read all local files.
|
Ok Thanks,There i already learned something.So i changed the permission to 111 now,but now i cannot see the output of the program,for instance say I have script Hallo.php that just echo's Hallo. If i run it as root(./Hallo.php) its outputs hallo,but if a run it as user it runs,but outputs nothing.the permission looks like this now...
Code:
ls -l Code:
[root@box]./Hallo.php Code:
[user@box]./Hallo.php |
This is not an answer to your question, but I would like to point out there are other methods to run a command on remote boxen. If the commands don't change (often) then copying the file to the servers and using a ssh tool could be efficient. If you can't or won't copy, then there's tools like Webjob.
|
All times are GMT -5. The time now is 09:08 AM. |