LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 08-15-2006, 01:06 PM   #1
ayteebee
Member
 
Registered: Jul 2005
Location: Derbyshire
Distribution: Originally Suse 9.1 Professional, currently Knoppix 3.7, migrating to Slackware
Posts: 75

Rep: Reputation: 16
Question non standard [custom] directory structures


I was wondering whether it was a bad idea to have a non-standard directory structure on my system.

The standard structure seems to be something like:
/home/$USER/ [$USER's home directory]
~/ [a shortcut for the above]
/bin/ [binaries (programs) that are accessible by anyone]
/sbin/ [binaries that are accessible only by the super user]

And so on and so forth.

I didn't like this system because it doesn't seem to allow much sharing of files between users. It can be done, certainly, but it just seemed a bit cumbersome. I am the only person who uses my computer in my house, and I wanted to have things like my music collection available for all users - when I'm root I still want to be able to hear it and you never know, I might one day have a guest user who also wants to hear some music. The structure I opted for is one where most of the files and stuff are stored in the root directory. It goes something like this:

/snd/ [where I keep all sound files, such as edited snippets, system sounds, etc]
/img/ [images. This directory is a categorised into subdirectories, a system that works well with Digikam]
/music/ [my music collection]
/downloads/ [downloaded files from the internet]
/backup/ [mount point for another HDD for when I back up. Which I haven't done for a very long time, come to think of it...]
/stuff/ [storage place for general crap]
/school/ [hey, I should be able to delete this soon! ]

That's pretty much the gist of it. All directories have permissions rwxrwxrwx (or 777) so that all users can use them. Can anybody see any problems with this - I know that most of the protocols that have been developed in Linux developed the way they did for a good reason and I don't want to find out why! (Not the hard way, anyway). For example, if I accidentally download a malicious program into /downloads/ have I circumvented the security measures inherent in the Linux system?

Does anybody else have a non-standard directory structure?
 
Old 08-15-2006, 02:07 PM   #2
mad4linux
Member
 
Registered: Aug 2003
Distribution: Debian Testing / kubuntu
Posts: 86

Rep: Reputation: 21
just leave the directory structure and put your dirs mentioned into /home/
put all of your created dirs to the group "users" and give all privileges on the dirs to user and group
Code:
Code:
cd /home
mkdir sound
mkdir for all directories you want
Code:
chgrp users sound
chmod 775 sound
again for all dirs you have created

now, everybody belonging to the group "users" can access those dirs and write to them.
 
Old 08-15-2006, 02:23 PM   #3
toreric
Member
 
Registered: Dec 2005
Location: Tväråmark, Sweden
Distribution: Debian/Kubuntu
Posts: 96

Rep: Reputation: 16
caution!

I would strongly recommend not to alter any of your basic directory structure (Linux is based on a certain given structure, you can study the topic in various documents).

You apparently need a public directory. I am not sure what would be best, but you can definitely add a 'public root' directory as ~/public , say, in your home directory, and grant any rights needed to that in order to give anybody access to anything in it. Alternatively, you may put such a public root in the var or usr (or var/local or usr/local) directories, but I'm not enough certain to give a clear recommendation. Check also whether those places are installed on different disk partitions having enough disk space.

Such an addendum to your directory structure would not be called 'non-standard'.
 
Old 08-16-2006, 11:45 AM   #4
mad4linux
Member
 
Registered: Aug 2003
Distribution: Debian Testing / kubuntu
Posts: 86

Rep: Reputation: 21
put all your data files into /home
this is your playground, where userfolders are created, usually having the same name as the user that owns it, and all user data like texts, images, sounds are stored.
you can create /home/public or just the /home/sounds /home/pics ... folders if you wish to give all users (write-)access to those folders. The /home/public/sounds idea may be better for ease of use.
Note as well that users of the same group usually have read access to the folders of each other.
 
Old 08-16-2006, 01:28 PM   #5
toreric
Member
 
Registered: Dec 2005
Location: Tväråmark, Sweden
Distribution: Debian/Kubuntu
Posts: 96

Rep: Reputation: 16
Quote:
Originally Posted by mad4linux
... create /home/public or just the /home/sounds /home/pics ... folders ...
Maybe a silly question, but do you mean 'user folders' with another user (yourself) as the real user? I like it, if there aren't any 'system drawbacks' that may pop up one day?!
 
Old 08-17-2006, 11:59 AM   #6
mad4linux
Member
 
Registered: Aug 2003
Distribution: Debian Testing / kubuntu
Posts: 86

Rep: Reputation: 21
Quote:
do you mean 'user folders' with another user (yourself) as the real user? I like it, if there aren't any 'system drawbacks' that may pop up one day?!
well, on my system at home, where i know all users and know that they are 'friendly users', i just create folders for my own user and give full rights on them for the 'users' group. a ls -l in /home may look somewhat like this:

Code:
mad4linux@danux:/home> ls -l
totally 36
drwxrwxr-x  25 mad4linux users  4096 ... allusers
drwxr-xr-x  48 mad4linux users  4096 ... mad4linux

...
with the 'allusers' folder open for all group members and 'mad4linux' as the personal folder for the user mad4linux (my own user)

if you have a system with possibly unfriendly users (or just unknown users), it could be better to create a special user named somewhat like 'open4users'. If this user doesn't belong to any other group then users, i personally can't see any special problems related to such an open folder.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help: regarding comparing two directory tree structures raj_thota Linux - Software 2 11-02-2005 12:19 PM
hel: regarding comparing two directory tree structures raj_thota Programming 1 11-02-2005 07:16 AM
Help: regarding comparing two directory tree structures raj_thota Solaris / OpenSolaris 1 11-02-2005 07:16 AM
need help setting up ftp user accounts and directory structures aikym1 Linux - Newbie 4 07-19-2004 03:17 PM
standard or custom mandrake kernel? apberzerk Mandriva 3 10-26-2003 09:52 PM


All times are GMT -5. The time now is 07:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration