LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2011, 10:42 AM   #1
rva1945
LQ Newbie
 
Registered: Feb 2011
Posts: 22

Rep: Reputation: 0
"All users" folder, does it exist in Ubuntu?


I want to migrate, or better saying, escape from Windows. When you create users in W, an All Users folder is created, where everyone has access to share documents and folders.

Do we have that in Ubuntu? I guess the folder should appear at the same level if the other users' folders, in Home, right?

But even with administrator account-type, I can't create that folder.
 
Old 03-08-2011, 11:17 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
You don't have anything like that in linux. If you want to share files with all users on your computer, you will need to create a folder and give it the proper permissions for other users to access it.
 
Old 03-08-2011, 11:23 AM   #3
rva1945
LQ Newbie
 
Registered: Feb 2011
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by corp769 View Post
You don't have anything like that in linux. If you want to share files with all users on your computer, you will need to create a folder and give it the proper permissions for other users to access it.
Ok, but I can't create a folder inside Home folder, as if it was another user.

If I create the folder inside my home folder, I will be the only one allowed access to it.
 
Old 03-08-2011, 11:25 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by rva1945 View Post
If I create the folder inside my home folder, I will be the only one allowed access to it.
Well yes, unless you sort the permissions out as corp769 said. Have a look at this if you don't know about permissions.
 
Old 03-08-2011, 11:28 AM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
As root, create a folder in /home, called anything you want. For full access, chmod the new folder to 777. That will give it read, write, and execute permissions.

Cheers,

Josh
 
Old 03-08-2011, 11:31 AM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,788
Blog Entries: 1

Rep: Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340Reputation: 1340
/tmp/ is technically an "all users" directory
 
Old 03-08-2011, 11:38 AM   #7
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by szboardstretcher View Post
/tmp/ is technically an "all users" directory
But has the "s" flag set so only the user creating a file (or someone with "root" priv.) can delete it.
 
Old 03-08-2011, 01:16 PM   #8
rva1945
LQ Newbie
 
Registered: Feb 2011
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by corp769 View Post
As root, create a folder in /home, called anything you want. For full access, chmod the new folder to 777. That will give it read, write, and execute permissions.

Cheers,

Josh
Something to be done in terminal?
Something like

cd ..
sudo mkdir (folder name)

then I could use Nautilus, navigate to that folder, right click and set permissions to everyone? Do I have to be root to do that? perhaps I could do it from Terminal (now the ever asked question: how?)

thanks
 
Old 03-08-2011, 01:18 PM   #9
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
If you read my first post, you would learn how to change the permissions from the command line. Chmod? And yes, as root.
 
Old 03-08-2011, 01:33 PM   #10
rva1945
LQ Newbie
 
Registered: Feb 2011
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by corp769 View Post
As root, create a folder in /home, called anything you want. For full access, chmod the new folder to 777. That will give it read, write, and execute permissions.

Cheers,

Josh
I created the folder, when I righ-clicked on it, then Sharing options, I enabled share this folder, then a message said something about Windows networks to be installed, now I see that while the package file are being downloaded, Samba is going to be installed. I thought it was necessary for sharing folders and resources with Windows systems, not between Linux systems.
 
Old 03-08-2011, 01:53 PM   #11
rva1945
LQ Newbie
 
Registered: Feb 2011
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by corp769 View Post
As root, create a folder in /home, called anything you want. For full access, chmod the new folder to 777. That will give it read, write, and execute permissions.

Cheers,

Josh


I granted permissions

sudo chmod 777 -R /home/compartidos (the name of the folder)

I created a couple of docs which I saved in that folder, then switched user, but those files appear as locked, and open in Read-only mode (of course I closed them in my session).

Do I have to grant permissions to every new file I create/copy there?
 
Old 03-08-2011, 03:01 PM   #12
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
As the user who creates the file, yes.
 
Old 03-08-2011, 05:58 PM   #13
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by rva1945 View Post

I granted permissions

sudo chmod 777 -R /home/compartidos (the name of the folder)

I created a couple of docs which I saved in that folder, then switched user, but those files appear as locked, and open in Read-only mode (of course I closed them in my session).

Do I have to grant permissions to every new file I create/copy there?
Well, what you're trying to do is why groups are implemented in most Linux file systems. To illustrate the problem, consider this:
Code:
  1. $ ls -l / | grep home drwxr-xr-x. 5 root root 4096 Mar 8 12:30 home
  2. $ ls -l /home/ total 8 drwx------. 30 Judy Judy 4096 Sep 30 2009 Judy drwxrwx---. 78 Peter peter 4096 Mar 8 08:16 Peter
  3. $ sudo mkdir /home/test [sudo] password for Peter:
  4. $ sudo chmod 777 /home/test/
  5. $ touch /home/test/testing
  6. $ ls -l /home/test/testing -rw-rw-r--. 1 Peter Peter 0 Mar 8 12:31 /home/test/testing
  7. $ sudo touch /home/test/testing2
  8. $ ls -l /home/test/ total 0 -rw-rw-r--. 1 Peter Peter 0 Mar 8 12:31 testing -rw-r--r--. 1 root root 0 Mar 8 12:33 testing2
Ignoring the x permission that notes grants of "list" access to directories and "executable" access to files, this shows the following:

Command 1 shows that root can read and write to /home, and that members of the root group can read files in /home.

Command 2 shows that the user "Judy" can read and write files in /home/Judy and members of the "Judy" group have no access to the "Judy" home directory. The second line of the output is, however, slightly different: It shows, as expected, that the user "Peter" can read and write file in /home/Peter, but it also shows that members of the peter group (note the lower-case "p") can also read and write files in /home/Peter

Commands 3 through 8 show what happens when Peter and root create files in the newly created /home/test directory: The file created by Peter read or written to by members of the "Peter" group as well as the (expected) read/write permission the the user "Peter" has.

This illustrates, I think, where you're at in your struggle to let everyone read and execute files in your "compartidos" directory.

Now watch what happens when a "compartidos" group is created and the test files are changed to be members of that group:
Code:
  1. $ sudo lgroupadd compartidos [sudo] password for Peter:
  2. $ sudo chgrp compartidos /home/test/*
  3. $ sudo chmod g+rx /home/test/*
  4. $ ls -l /home/test/ total 0 -rw-rwxr--. 1 Peter compartidos 0 Mar 8 12:31 testing -rw-r-xr--. 1 root compartidos 0 Mar 8 12:33 testing2 -rw-r-xr--. 1 Peter compartidos 0 Mar 8 13:51 testing3
  5. $ cat /home/test/testing*
  6. $
(The concatenate command produces no output because the files are all empty. But, note, no error messages were produced.)

So, what I think you need to do is:
  1. Create some group that your "compartidos" users will have as one of their groups.
  2. Change each "compartidos" user to have that group as their primary group.
  3. Change the group membership of any files already in the "compartidos" directory to that of the new group, and
  4. Set the group file permissions.
 
Old 03-08-2011, 06:09 PM   #14
rva1945
LQ Newbie
 
Registered: Feb 2011
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ptrenholme View Post
well, what you're trying to do is why groups are implemented in most linux file systems. To illustrate the problem, consider this:
Code:
  1. $ ls -l / | grep home drwxr-xr-x. 5 root root 4096 mar 8 12:30 home
  2. $ ls -l /home/ total 8 drwx------. 30 judy judy 4096 sep 30 2009 judy drwxrwx---. 78 peter peter 4096 mar 8 08:16 peter
  3. $ sudo mkdir /home/test [sudo] password for peter:
  4. $ sudo chmod 777 /home/test/
  5. $ touch /home/test/testing
  6. $ ls -l /home/test/testing -rw-rw-r--. 1 peter peter 0 mar 8 12:31 /home/test/testing
  7. $ sudo touch /home/test/testing2
  8. $ ls -l /home/test/ total 0 -rw-rw-r--. 1 peter peter 0 mar 8 12:31 testing -rw-r--r--. 1 root root 0 mar 8 12:33 testing2
ignoring the x permission that notes grants of "list" access to directories and "executable" access to files, this shows the following:

Command 1 shows that root can read and write to /home, and that members of the root group can read files in /home.

Command 2 shows that the user "judy" can read and write files in /home/judy and members of the "judy" group have no access to the "judy" home directory. The second line of the output is, however, slightly different: It shows, as expected, that the user "peter" can read and write file in /home/peter, but it also shows that members of the peter group (note the lower-case "p") can also read and write files in /home/peter

commands 3 through 8 show what happens when peter and root create files in the newly created /home/test directory: The file created by peter read or written to by members of the "peter" group as well as the (expected) read/write permission the the user "peter" has.

This illustrates, i think, where you're at in your struggle to let everyone read and execute files in your "compartidos" directory.

Now watch what happens when a "compartidos" group is created and the test files are changed to be members of that group:
Code:
  1. $ sudo lgroupadd compartidos [sudo] password for peter:
  2. $ sudo chgrp compartidos /home/test/*
  3. $ sudo chmod g+rx /home/test/*
  4. $ ls -l /home/test/ total 0 -rw-rwxr--. 1 peter compartidos 0 mar 8 12:31 testing -rw-r-xr--. 1 root compartidos 0 mar 8 12:33 testing2 -rw-r-xr--. 1 peter compartidos 0 mar 8 13:51 testing3
  5. $ cat /home/test/testing*
  6. $
(the concatenate command produces no output because the files are all empty. But, note, no error messages were produced.)

so, what i think you need to do is:
  1. create some group that your "compartidos" users will have as one of their groups.
  2. change each "compartidos" user to have that group as their primary group.
  3. change the group membership of any files already in the "compartidos" directory to that of the new group, and
  4. set the group file permissions.
thanks man !
 
  


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
[SOLVED] There is no "menu.lst" in my Ubuntu "/boot/grub/" folder. msbstar Linux - Newbie 18 09-15-2012 02:26 PM
Why do the "£inux" and "PSinux" satirical misspellings even exist?! LOL! Kenny_Strawn General 19 12-09-2010 03:01 PM
Getting error : "The file or folder /mnt/win_c does not exist" JeetNayan Mandriva 5 01-19-2010 10:41 PM
Samba shared folder "doesn't exist" under Fedora 7 x86_64 rcx11 Linux - Server 5 10-30-2007 07:22 AM
script to count the mails in an users folder "/var/spool/mail/user" sharad Linux - Software 1 03-16-2006 11:58 PM


All times are GMT -5. The time now is 10:45 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration