User(s) browsing this thread: 1 Guest(s)
|
users, permissions and security: Executing aMule without "root" user
|
|
12-29-2008, 12:53 AM
(This post was last modified: 12-30-2008 12:09 AM by empatico.)
|
|||
|
|||
|
Hi all.
I'm concerned about the users, permissions and security on unix-like systems and specially on my PCH. Usually i run gnu/linux on my computer, but i don't know how to set up users and permissions properly because ubuntu do it for me (damn user friendly distros ^^). Now i try to set up users and permissions on my PCH but i'm confused. When i type "vi /etc/passwd" i see "guest" is the default non root user: also i see "nmt" is the owner of barely all the documents and folders from "/share", including those who i created via samba: I want know wich user from the users list i should use to run the programs i installed inside my PCH (as midnight comander, iperf, ... ) if i don't want to use the root account. Specially i want know how run amule and transmission without the root account for security reasons. Also, wich way do you recommend if i want run those apps automaticly every time i reset my PCH? |
|||
|
12-29-2008, 04:36 AM
(This post was last modified: 12-29-2008 04:43 AM by lordy.)
|
|||
|
|||
|
RE: users, permissions and security
Ideally The applications themselves should have a configuration option to switch user from root to another user.
Double check with the ps command Files on the internal H should be created under the NMT account. I sometimes do Code: chown -R nmt:nmt /share/.after a telnet session to make sure ownership is correct. This doesnt take too long as there are usually not too many files on a hard drive dedicated to holding large media files. Another approach is to run the command as the nmt user in the first place. The following command will start a new interactive shell under the nmt account... Code: su nmt -s /bin/shAnd the following command should execute a single command under the nmt account... Code: su nmt -s /bin/sh -c "command and options in quotes"Although this will have problems if the command has arguments that have spaces. In which case start a shell first. Oversight: Jukebox | FeedTime: Automatic nzbs |
|||
|
12-29-2008, 01:41 PM
|
|||
|
|||
|
RE: users, permissions and security
Thank you, now i see it clearer.
I really knew su, chmod, and those all commands. I will use "chown -R nmt:nmt /share/" to make sure ownership is correct as you said. Now i understand i should use nmt account because is the owner of all "/share". I will try run amule with nmt user and i will watch if it work properly. I don't know if i could run transmission as nmt user, because it runs automaticaly on every startup but i will try. |
|||
|
12-29-2008, 03:18 PM
(This post was last modified: 12-29-2008 03:23 PM by empatico.)
|
|||
|
|||
|
RE: users, permissions and security
Midnight Comander works fine with the nmt account, now i won't edit or delete the root stuff by mistake. Iperf works fine too. Perhaps i have problems with aMule.
i changed the owner of all the files needed for run amule: /mnt/syb8634/etc/amule.sh /mnt/syb8634/bin/amuled /mnt/syb8634/bin/amulecmd /mnt/syb8634/bin/amuleweb Also i changed the owner of all the files inside "/share/.aMule" folder: When i run the script "amule.sh" with the "nmt" account, i see the program can not start because the path "/home/nmt/.aMule". I can not find these path, also i think the correct path should be "/share/.aMule": I'm not sure if the solution it's creating the path "/home/nmt/.aMule" with the root account and then changing the owner of the path to "nmt" user. Then i can move all the files inside "/share/.aMule" to "/home/nmt/.aMule" and then run amule.sh script. Of course i will keep "/Temp" and "/Incoming" folders inside "/share" folder. |
|||
|
12-29-2008, 04:51 PM
(This post was last modified: 12-30-2008 02:26 AM by lordy.)
|
|||
|
|||
RE: users, permissions and security
(12-29-2008 03:18 PM)empatico Wrote: When i run the script "amule.sh" with the "nmt" account, i see the program can not start because the path "/home/nmt/.aMule". I can not find these path, also i think the correct path should be "/share/.aMule": It's looking for the nmt users home folder. I'd be wary of adding a home folder for nmt user because it may affect other applications or other parts of the nmt configuration. There may be no problem, but you never know. amule should have start up option to allow alternate location for the ~/.aMule folder (I guess the existing installtion was already using this option to avoid using the root home folder) Oversight: Jukebox | FeedTime: Automatic nzbs |
|||
|
12-29-2008, 05:24 PM
(This post was last modified: 12-29-2008 05:42 PM by empatico.)
|
|||
|
|||
|
RE: users, permissions and security
I understand what you say.
The amule.conf file have the OSDirectory option. I tried with "OSDirectory=/share//.aMule/" and "OSDirectory=/.aMule/", but amule still search the "/home/nmt/.aMule" path. I think that don't work because amule can't find the amule.conf file inside /share/.aMule/ path. Now i'm really confused. How could i say amule where find the amule.conf file? Maybe another solution it's create a new user just for execute amule.sh. this user should have the correct home path: /bin/true or whatever I'm giving you a lot of work, but i hope this will be usefull for those who have low posix skills, like me. |
|||
|
12-29-2008, 10:18 PM
(This post was last modified: 12-30-2008 02:25 AM by lordy.)
|
|||
|
|||
RE: users, permissions and security
(12-29-2008 05:24 PM)empatico Wrote: I understand what you say. Hi , I'm not too familir with the amule setup, perhaps if you re-post with amule in the title someone could help out. Creating a new user could work , but I suspect the user would have to be re-created at reboot. I think if someone could helpout on finding .amule conf under nmt user that would be the way to go. Or ask the person who ported it, if there is any simple way to run as the nmt user. Good luck
Oversight: Jukebox | FeedTime: Automatic nzbs |
|||
|
12-30-2008, 12:14 AM
|
|||
|
|||
|
RE: users, permissions and security: Executing aMule without "root" user
Title edited. Thank you for your help. I will keep working because i'm learning and it's funny.
|
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| User apps randomly stopping | prem1er | 2 | 789 |
11-26-2012 05:33 PM Last Post: Djiest |
|
| help with lundFTPD security | Slevin | 0 | 462 |
01-04-2012 01:18 AM Last Post: Slevin |
|
| NetworkMounter and user name | lucky55luc | 0 | 1,004 |
08-30-2011 08:12 AM Last Post: lucky55luc |
|
| Executing a script on the server from the NMT? | johnk | 6 | 3,212 |
02-21-2011 10:59 PM Last Post: johnk |
|
| Disable amule daemon | drunkendonkey | 0 | 1,449 |
02-04-2011 12:33 AM Last Post: drunkendonkey |
|
| amule uninstall | bettlejuice | 0 | 988 |
10-28-2010 08:38 PM Last Post: bettlejuice |
|
| Question about root.cron | pbusardo | 1 | 1,175 |
10-26-2010 08:54 PM Last Post: halfelite |
|
| FTP permissions 000 | diderikfrom | 6 | 3,283 |
08-25-2010 06:17 PM Last Post: infinite.recursion |
|
| aMule 2.2.3-2 build for NMT Popcorn Hours [updated 3/31/2009] | empatico | 59 | 35,245 |
03-01-2010 06:19 AM Last Post: fancyboy2k |
|
| [A-200] Firmware Location/User Manual Needed | mulder | 4 | 2,475 |
01-25-2010 08:30 PM Last Post: michael1t |
|

Twitter
Facebook
NMT Wiki
Search
Member List
Help
A-400 [13 May 2013]




![[+]](images/collapse_collapsed.gif)
