Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Keeping things safe
{XN}Boylett
post Dec 14 2008, 05:34 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075



Hi

I'm wondering, is there a way to run programs as 1 user, but not allow them to change directory and view directories higher than themselves?

So, for example:

I start a program in /home/blah
That program can access any files and folders in the /home/blah directory, however, it can't go up a directory.

Thanks.
Go to the top of the page
 
+Quote Post
michaelk
post Dec 14 2008, 08:50 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



http://www.jmcresearch.com/projects/jail/

Google for chroot
Go to the top of the page
 
+Quote Post
{XN}Boylett
post Dec 14 2008, 10:50 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075



Hi

Thanks for reply.

I tried using chroot, but it keeps telling me "No such file or directory"

chroot /home/user ./start.sh

and start.sh contains:
#!/bin/sh
nohup ./server &
Go to the top of the page
 
+Quote Post
michaelk
post Dec 14 2008, 11:08 AM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



Try replacing ./ with the complete path.
Go to the top of the page
 
+Quote Post
{XN}Boylett
post Dec 14 2008, 06:21 PM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075



I get the same result.
Go to the top of the page
 
+Quote Post
michaelk
post Dec 14 2008, 06:53 PM
Post #6


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



for the command and your script?
Go to the top of the page
 
+Quote Post
{XN}Boylett
post Dec 15 2008, 11:15 AM
Post #7


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075



I did some googling.. apparently is because there isnt a /bin/sh so start.sh wont work. However, if I try starting server directly, it still doesnt work.

chroot /home/user /server

and server is a binary file

EDIT: I dont know if chroot is what I need.
I want the program to act as it's starting directory is its user's home directory, so it cant cd up but it can view all files in sub directories etc.
Go to the top of the page
 
+Quote Post
michaelk
post Dec 15 2008, 06:34 PM
Post #8


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



Have you looked at the URL I posted?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd October 2017 - 03:14 AM