You are Here:
Install Updates Gimp Error - see Security & Bug Fixes Section Sticky



[ ABANDONED ] Two users access to common folder

Author (Read 1925 times)

0 Members and 1 Guest are viewing this topic.

Two users access to common folder
« on: May 02, 2018, 05:12:51 PM »
 

Sprintrdriver

  • Forum Regular
  • ***
  • 105
    Posts
  • Country: no
  • Reputation: 5
  • Linux Lite on Dell Lattude D620

  • Linux Lite: 4.2 64bit

  • CPU: Intel Core2 T5500

  • MEMORY: 3Gb

  • VIDEO CARD: Intel Mobile 945GM/GMS 943/940GML Express
Hi forum.

I have this situation where I have two users on the computer. I have tried to read up on users and groups to understand, but is still very new to this (most of what I have done so far is by googling to find solutions, and I have not this in my fingertips so to speak).

When I installed LL, I left a partition (last half of disk space, ext4) for it self for general file store.

Now I have made a folder, say it's named "everybody", it is supposed to hold files that both users have access to. Both users should be able to edit and delete whatever file the other user have created.

First off what I have done is to create a group "commonfiles" and put user1 and user2 in that group. Then I made permission to folder "everybody" so that it had group "commonfiles" with all permission. user1 is the owner of "everybody" folder.

What I discovered next - a thing that I didn't want to happen. If I create a new sub folder logged in as user1, that folder got permission that owner/group of "user1". So when I log on as user2 and navigate into the same folder, user2 cannot edit/delete any files, unless user1 spesific say that the newly created folder should have group commonfiles instead of user1.

The question I have to make life easier: Should I just forget about having this group called "commonfiles" and instead just make user2 into group "user1"? That is - what benefits / caveats should I expect if I does that?
Last Edit: October 19, 2018, 05:51:41 AM by Jerry
I won't let an old, but fully functional computer die just because some company tell me that they won't make no more security updates to their OS. Thanks Linux :)
 


Re: Two users access to common folder
« Reply #1 on: May 02, 2018, 05:48:31 PM »
 

Scott

  • Global Moderator
  • Gold Level Poster
  • *****
  • 858
    Posts
  • Country: 00
  • Reputation: 186
  • Linux Lite Member

  • Linux Lite: 3.4 64bit

  • CPU: Dual core Intel Core i3 M 330

  • MEMORY: 6Gb

  • VIDEO CARD: Intel Integrated Graphics
Hi Sprintdriver

Quote
When I installed LL, I left a partition (last half of disk space, ext4) for it self for general file store.

One possible solution is to format the partition mentioned above with the FAT file system.
 

Re: Two users access to common folder
« Reply #2 on: May 02, 2018, 07:02:09 PM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1034
    Posts
  • Country: us
  • Reputation: 179
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 4.6 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D
User permissions have OS implications. You're trying to use a partition like a db which you cannot configure how you want without either actually making it a db, or adding the partition back to the OS the users are on so that the user settings you want to use apply. The partition is clear of the OS now so either add it back in or use a db manager.

TC
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: Two users access to common folder
« Reply #3 on: May 03, 2018, 06:28:25 PM »
 

Sprintrdriver

  • Forum Regular
  • ***
  • 105
    Posts
  • Country: no
  • Reputation: 5
  • Linux Lite on Dell Lattude D620

  • Linux Lite: 4.2 64bit

  • CPU: Intel Core2 T5500

  • MEMORY: 3Gb

  • VIDEO CARD: Intel Mobile 945GM/GMS 943/940GML Express
Thanks for answers.

First off - just an addition to my first post: What I does is I tries to use two separate users (both is actually me as I'm the only physical user of the laptop) where user2 is the one that deals with sensitive files (passwords, etc...), as an alternative to using temporary encryption such as Veracrypt. So far it seems to be the way to go, but I need to be able to put some files to a common location so both users can access, regardless which user have created the file or folder.

@Scott - fat is not the right thing for me as I think it is a nice thing to be able to restrict access of some users but not all. And with fat I won't be able to save very large files.

@trinidad - I'm not into databases so I'm not sure where that answer leads to. Why should I want to convert it into a database?
I won't let an old, but fully functional computer die just because some company tell me that they won't make no more security updates to their OS. Thanks Linux :)
 

Re: Two users access to common folder
« Reply #4 on: May 04, 2018, 11:46:40 AM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1034
    Posts
  • Country: us
  • Reputation: 179
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 4.6 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D
Again to clarify: You say you installed your LL OS to one partition and left another separate partition for file storage. When a user writes a file to that partition and saves it there those permissions apply. Another user must have the same permissions, however when mounted the extra partition has its own permissions which match whatever permissions it's previous user applied plus whatever was applied during install. Ext 4 is a journaling file system. You have three owners in effect, root, user1, and user 2. Root owns BOTH ext4 partitions and your OS file system (per your installation) It's not going to perform the way you want, the way you are trying to set it up. *Fat 32 with a storage flag would work for you depending on the file extensions and what you are doing with them. It's really kind of pointless to have the extra ext4 partition and not manage it as a db, especially if you want to share files between users.

"What I does is I tries to use two separate users (both is actually me as I'm the only physical user of the laptop) where user2 is the one that deals with sensitive files (passwords, etc...), as an alternative to using temporary encryption such as Veracrypt."

Hard to understand the point of this for an everyday LL user.

TC     
Last Edit: May 04, 2018, 12:03:23 PM by trinidad
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: Two users access to common folder
« Reply #5 on: May 04, 2018, 12:04:41 PM »
 

Scott

  • Global Moderator
  • Gold Level Poster
  • *****
  • 858
    Posts
  • Country: 00
  • Reputation: 186
  • Linux Lite Member

  • Linux Lite: 3.4 64bit

  • CPU: Dual core Intel Core i3 M 330

  • MEMORY: 6Gb

  • VIDEO CARD: Intel Integrated Graphics

@trinidad

I happen to agree that FAT32 will probably be the good choice here but Sprintrdriver mentioned in reply #3 that file size is a concern. Do you have experience with exFAT filesystem? I know that would solve the issue of max file size but how about his permissions concern? I believe in LL 3.X/(ubuntu 16.04) it needs to be installed separately (packages exfat-fuse, exfat-utils) but I'm not sure about this.
 

Re: Two users access to common folder
« Reply #6 on: January 21, 2019, 11:01:07 AM »
 

Sprintrdriver

  • Forum Regular
  • ***
  • 105
    Posts
  • Country: no
  • Reputation: 5
  • Linux Lite on Dell Lattude D620

  • Linux Lite: 4.2 64bit

  • CPU: Intel Core2 T5500

  • MEMORY: 3Gb

  • VIDEO CARD: Intel Mobile 945GM/GMS 943/940GML Express
Hope it's ok that I update this old thread - I doesn't want to be rude and not giving credits for those answering me.

I have make a very dumb thing here. When I wrote this post, I had LL 3.6 installed, and I know for sure I got it right. Then I wiped everything exept partition order when installing LL 4.2 - But stupid as I was, I forgot to write down what I did (lost Terminal history)

The annoying part is that I managed to wrote down the one thing that didn't work as I wanted.
sudo setfacl -m

This command, when specifying group and directory, turned out to only be effective to that specific folder, and not the directory structure below (i.e. not recursive).
But I know it's close, because I know the next thing I did, worked - i.e. made a directory having full privilegies for two users for every existing file and new files.
I won't let an old, but fully functional computer die just because some company tell me that they won't make no more security updates to their OS. Thanks Linux :)
 

Re: Two users access to common folder
« Reply #7 on: February 16, 2019, 05:34:38 PM »
 

Sprintrdriver

  • Forum Regular
  • ***
  • 105
    Posts
  • Country: no
  • Reputation: 5
  • Linux Lite on Dell Lattude D620

  • Linux Lite: 4.2 64bit

  • CPU: Intel Core2 T5500

  • MEMORY: 3Gb

  • VIDEO CARD: Intel Mobile 945GM/GMS 943/940GML Express
Hi again. I just find my notes from back then - so I figured to share that.

STEP 1 - Get an overview over groups
cat /etc/group
 (I don't recall if I had to put user2 into same group as user1)

STEP 2 - Use chgrp to change group ownership of that folder.

STEP 3 - use chmod recursively
sudo chmod -R 2775 /storagefolder/

I won't let an old, but fully functional computer die just because some company tell me that they won't make no more security updates to their OS. Thanks Linux :)
 


Tags: user and groups 
 


Install Updates Gimp Error - see Security & Bug Fixes Section Sticky