Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Newbie
Reload this Page Question about where to put shared files in a Linux system
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Newbie If you're new to the wonderful world of Linux, start here!

Reply
 
Thread Tools Display Modes
Old 05-05-2008   #1 (permalink)
igorcarajo
Just Joined!
 
Join Date: May 2008
Posts: 2
Question about where to put shared files in a Linux system

Hello,

I am a Linux newbie. I installed Ubuntu (version 8.04) recently and I'm trying to set it up properly. When I installed Linux, I partitioned the hard drive following a recommendation that said to create a separate partition for the "home" directory, so I did it that way. So I created a 40 GB partition for the root directory and a 100 GB partition for the "home" directory. Anyway, now I want to use an application that will require about 20 GB of data files, and those files should be accessible to every user on the computer. So I don't know where to put those data files. I'm afraid that if I put them somewhere in the root directory, there won't be much space left (there's only 30 GB left now). Is "home" supposed to be used only for files that are private to every user? Like:

/home/user1
/home/user2
...
or could I create a /home/shared/...

I don't know if by creating a "shared" directory in "home" I'm violating some sort of Linux best practices.

Or maybe what I need to do is change the partition sizes (can I do that?) so that root is bigger and home is smaller.

Thanks in advance for any suggestions.
igorcarajo is offline   Reply With Quote
Old 05-05-2008   #2 (permalink)
raghaven.kumar
Linux Newbie
 
raghaven.kumar's Avatar
 
Join Date: Mar 2008
Location: Bangalore, India
Posts: 126
no need to resize partition

you can just create a folder on /home
and change permissions for it using
chmod -R 777 <folder-name>



PS: you need to be root or use sudo to do this.
raghaven.kumar is offline   Reply With Quote
Old 05-05-2008   #3 (permalink)
igorcarajo
Just Joined!
 
Join Date: May 2008
Posts: 2
Thanks. I will do that.
igorcarajo is offline   Reply With Quote
Old 05-13-2008   #4 (permalink)
Ropez
Just Joined!
 
Join Date: May 2008
Posts: 3
Hi, this is my first post to this forum!

I'm actually a quite experienced linux user, but I was interested in this topic because I wanted to create a /home/shared directory to put my family pictures and other things that aren't related to my user account.

The answer above isn't actually a complete solution. Setting permissions to 777 on the directory makes it possible for any user to create files, but it doesn't guarantee that all users have permissions to access new files and directory.

I want to have a shared directory for a group of users that guarantees:
  • Files created by any user is readable, writable and deletable by any user
  • Directories created by any user have the same property
  • Only root can deny other users access to any file

I tried to use the setgid flag to force all file and directories to belong to the group, but it didn't work quite as I wanted:
  • Default permissions for the active user caused new files to be not writable by the group. I want to force new files to be writable by the group, regardless of user settings.
  • If a directory tree is moved/copied from the user's home dir, the GID isn't changed, making it possible for the user to add files that aren't owned by the group.
  • It's still possible for the user to change the group of his files.

Is it possible to force all files in the directory to belong to a certain group and have all the permissions flags for the group set?
Ropez is offline   Reply With Quote
Old 05-14-2008   #5 (permalink)
raghaven.kumar
Linux Newbie
 
raghaven.kumar's Avatar
 
Join Date: Mar 2008
Location: Bangalore, India
Posts: 126
chgrp can have you somthing
Its just a simple solution, for more advanced you can use acl !
do you want somethin like that?
raghaven.kumar is offline   Reply With Quote
Old 05-14-2008   #6 (permalink)
Ropez
Just Joined!
 
Join Date: May 2008
Posts: 3
No! I don't want more advanced options. I want a more simple system. I want all files to be available to all users, including new files and directories.
Ropez is offline   Reply With Quote
Old 05-16-2008   #7 (permalink)
raghaven.kumar
Linux Newbie
 
raghaven.kumar's Avatar
 
Join Date: Mar 2008
Location: Bangalore, India
Posts: 126
fine then set special bit to the folder
for eg.,
chmod 6775 /home/shared
will give all access for the owner and group while denying the write access for the other users.
raghaven.kumar is offline   Reply With Quote
Old 05-21-2008   #8 (permalink)
Ropez
Just Joined!
 
Join Date: May 2008
Posts: 3
@raghaven.kumar:

If you had read my original post, I have tried the "setgid flag", which is the same as you suggest.

It doesn't force new files to be accessable to all users in the group.

The biggest problem is that if the user's default setting for new files/directories is to make them not writable for the group, then other users in the group won't be able to change/remove files added by this user.
Ropez is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 06:15 AM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0