File ownership.... how to figure out who to assign to...

Jan 12, 2006
67
0
0
I should start off with the fact that currently, all of my PC's are running Windows, and the system with the linux filesystem is a D-Link DNS-323 NAS box. I will be moving one of my computer's to Linux at some point (not enough time right now), but on the the question at hand.....


I have googled this, and the only thing I seem to be getting in return is how to use the chmod, chown, and chgrp commands.

Basically, I am trying to figure out who to give ownership to some directories to, or if I should leave them as 'nobody'.... Also, some have group assignments to "501".... not sure who that is.

/mnt/HD_a2 # ls -l
dr-xr-xr-x 4 root root 4096 Oct 14 17:04 Anonymous FTP
drwxrwxr-x 7 root Admin 4096 Oct 17 00:35 Data
drwxrwxrwx 2 root Admin 4096 Oct 15 01:19 FTP
-rwxrwxrwx 1 nobody 501 1181 Apr 25 23:15 fun_plug
drwxr-xr-x 6 root root 4096 Apr 25 23:30 fun_plug.d
drwxrwxrwx 3 nobody 501 4096 Apr 26 00:09 lnx_bin
drwxrwxrwx 5 nobody 501 4096 Apr 26 03:07 www

Anonymous FTP - Directory for external & internal Anonymous FTP users. I assigned ownership of this to root.
Data - Stored data for LAN users mostly, and my occaisional remote use (from work mostly)
FTP - Not set up yet, but this will be the directory for the users with passwords to the server.
fun_plug is a file necessary to add functionality to my DNS-323, such as telnet access, and the web server. The script is executed when the system boots.
fun_plug.d & lnx_bin are used for add-ons to the NAS box. Only thing in there is other scripts, and other components for the linux OS to run (Daemons I think they are called??)

Lastly, the www directory is for the webpage hosted in the box, and only get accessed though http, unless I am FTP'd to the box to edit the page from work.....

Just wondering if anyone can shed some light on this for me.... Thanks guys,
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Also, some have group assignments to "501".... not sure who that is.

If it shows as a number then the number doesn't correspond to any user or group on the system.

Anonymous FTP - Directory for external & internal Anonymous FTP users. I assigned ownership of this to root.

This is probably fine, it really depends on how you want to deal with the anon FTP data though. The FTP server probably runs as it's own user so if you want it to be able to add, delete, access, etc files then it's group or everyone will need access to them. The same is true for any other users that you might want to manipulate those files.

Data - Stored data for LAN users mostly, and my occaisional remote use (from work mostly)

Generally the top directory would be owned by root but the data itself would be owned by each individual user.

FTP - Not set up yet, but this will be the directory for the users with passwords to the server.

Same as data.

fun_plug is a file necessary to add functionality to my DNS-323, such as telnet access, and the web server. The script is executed when the system boots.
fun_plug.d & lnx_bin are used for add-ons to the NAS box. Only thing in there is other scripts, and other components for the linux OS to run (Daemons I think they are called??)

If it's only used on boot it should probably be in another filesystem if possible and owned by root. And do yourself a favor and don't enable telnet.

Lastly, the www directory is for the webpage hosted in the box, and only get accessed though http, unless I am FTP'd to the box to edit the page from work.....

If you want to be able to do anything with the pages then you'll need to give yourself write access to them and the directories they're in.
 
Jan 12, 2006
67
0
0
Thanks for the reply!!!

I think I am starting to better understand the file ownership and whatnot now.

As far as telnet, it is already enabled, but only for the LAN right now. I have port forwarding set up for telnet & SSH in the router, but it isn't ENABLED right now, so attempting to telnet from the internet gives a "Could not open connection to the host, on port 23: Connect failed"

Again, thank you!!