oshunluvr Posted October 29, 2006 Report Share Posted October 29, 2006 I have five family members that regularly use my system. There are a lot of file I'd like everyone to have access to easily (none of them is even remotely computer saavy save my 15 year-old). I want 1000's of music, video and picture files to be accessed without difficulty. Using file sharing via nfs works, but it still leaves music files (for example) scattered over each persons personal directories making them hard to locate for some of my users. I want a single location to save and read these files. Here's the experimental method I'm trying right now... I have created a user named "share" and put all the other users in the share group. I then created a share home directory. This worked to a point - letting everyone find files, but it still resulted in many files left in each home users locations. So I renamed each persons personal directories as "MyMusic", "MyPictures" and so on and create symlinks to the shared directories using the default names of "Music", "Pictures" and so on. This way it's fairly obvious to my least interested user where the file are and should go...MyPictures are for me only and Pictures are for everyone. This allows my to keep all users directories private and still allow everyone to find what they want to AND save pictures and so on to share with the rest of us. So the point of this post...I'm somewhat of a linux noob. I'd like to hear from the experts on better plans for my needs or other solutions that work. Also, what caveats I should be looking out for using my method. [moved from Installing Mandriva by spinynorman] Quote Link to comment Share on other sites More sharing options...
shengchieh Posted October 29, 2006 Report Share Posted October 29, 2006 Learn about chmod (change permission of a file) chgrp (change group) chown (change ownership) then you should be able to do anything you want. I.e., chmod ugo+r <file> will let everybody see it, but chmod go-rwx <file> will only let you see it. Use the manpage for more infos, i.e., man chmod man chgrp man chown Sheng-Chieh Quote Link to comment Share on other sites More sharing options...
oshunluvr Posted October 30, 2006 Author Report Share Posted October 30, 2006 Yeah, I can do all that. The issue is to have these directories/files readily available to my dumb users without me having to log in and move/chown/chmod all the time. I added my new "MyWhatevr" directories to the selection list so they should be able to see what's going on. I did have to reconfigure openoffice to default to "MyDocument" and I'm sure other programs will have to be changed this way. I could have left the private directories alone and used "SharedWhatever" as the new directories, I guess... Quote Link to comment Share on other sites More sharing options...
tyme Posted October 30, 2006 Report Share Posted October 30, 2006 I would create a top directory named shared, i.e.: # mkdir /shared and chown that to have access for all users: # chown -r [youruser]:users /shared group should already have read permissions, but if you want to give them write also: # chmod g+w /shared the #'s indicate that you must do it as root and are not part of the commands That should work, though you may need to change permissions on any files added to the directory. Quote Link to comment Share on other sites More sharing options...
oshunluvr Posted October 30, 2006 Author Report Share Posted October 30, 2006 Thats basically what I've done. I added the group "share" and put everyone it it. I would like a way to force automatic correct ownership, i.e. assign group "share" to all files in that directory. Maybe a script file that executes on log out? Where would be the best place to do that? Quote Link to comment Share on other sites More sharing options...
crispus Posted October 30, 2006 Report Share Posted October 30, 2006 I would like a way to force automatic correct ownership, i.e. assign group "share" to all files in that directory Would placing all of your shared files (music, docs, etc) on a separate fat partition and mounting it through fstab with read/write for all users make a difference? You could then symlink all the folders to that partition or parts of the directory tree in that partition. On my dual boot machine, I have a separate partition that houses all my music files that can be shared between windows and linux and all users. -Crispus Quote Link to comment Share on other sites More sharing options...
oshunluvr Posted October 30, 2006 Author Report Share Posted October 30, 2006 I no longeruse windo$e so I don't really need the fat partition but I did think of that earlier today. I believe I am correct in thinking that vfat/fat32 doesn't support file ownership thereby removing the need for some of the above. Of course, I feel this method may introduce somewhat less reliable file storage and speed. I guess you can't have it all! Quote Link to comment Share on other sites More sharing options...
emmanuel_uk Posted October 31, 2006 Report Share Posted October 31, 2006 I would like a way to force automatic correct ownership, i.e. assign group "share" to all files in that directory. drakperm does that, just add your policy in it it will run at fixed interval Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted October 31, 2006 Report Share Posted October 31, 2006 I come a little late into the discussion. The best way I've found to share files is to use the s bit on directories, and change the default umask. All my users who share files are in the same primary group (let's say "GROUP"), and all have the default umask "007". My shared directory is owned by the same group (the user does not matter) and has these permissions: 2770. Now all directories and files created inside automatically have the same group as the shared directory (thanks to the 2 in the mode) and the right permissions (thanks to the users' umask). That being said, drakperm could come in handy because some applications don't follow the umask (I consider this a bug). Yves. Quote Link to comment Share on other sites More sharing options...
oshunluvr Posted November 14, 2006 Author Report Share Posted November 14, 2006 (edited) I come a little late into the discussion. The best way I've found to share files is to use the s bit on directories, and change the default umask. All my users who share files are in the same primary group (let's say "GROUP"), and all have the default umask "007". My shared directory is owned by the same group (the user does not matter) and has these permissions: 2770. Now all directories and files created inside automatically have the same group as the shared directory (thanks to the 2 in the mode) and the right permissions (thanks to the users' umask). That being said, drakperm could come in handy because some applications don't follow the umask (I consider this a bug). Yves. Sorry to be a 'tard -> so my shared directory is /share and my users are all in the group share. So how do I add the 2 to the permissions? If I am using konqueror is it the "Set GID" tag under advanced permissions? Is there a chown or chmod command? I'd prefer the command line entry because frankly, konqueror is not all that good at recursing. I haven't tried drakperm yet but I will. [EDIT] Kongueror seems to work by selecting "Set GID" under advanced permissions and applying changes to all files. So with drakperm I added a "rule" setting the group and owner as "share" (it made me select both or none) and set permissions to 2774. I used that instead of 2770 because I have a guest user that can read but not edit or execute those files. So it seems this accomplishes what I wanted. Thanks everyone for your input. Edited November 14, 2006 by oshunluvr Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.