Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is there a KDE widget to share files between two users?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Goverp
Veteran
Veteran


Joined: 07 Mar 2007
Posts: 1998

PostPosted: Sat Feb 10, 2018 1:18 pm    Post subject: Is there a KDE widget to share files between two users? Reply with quote

Use case:
I've a general-use linux userid, from which I'm writing this, and a separate userid which I use only for financial stuff.
My default umask is 0026, so without playing group games, the userids cannot read each others' files.
I'm using KDE, and I'd like a foldery widget on both user's desktop into which both users can drop files, and both users can read the files it contains. I.e. the action of dropping a file in it makes it visible and readable from the other userid.
Using groups, it's easy: add each user's self-named group to the other user's group list, and the folder is a {sym?}link on one desktop to a real folder on the other. But that has a side-effect: all files on one userid are readable from the other, and that's too broad. I just want the files in the folder to be shared..

There's probably a way using groups, but I'd rather not fiddle with file Properties on the desktop or use chmod in a terminal; the action of dropping should do whatever's necessary.

Anybody know of a way to achieve this? I can't be the first to want this.
Thanks for suggestions.
_________________
Greybeard
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Sat Feb 10, 2018 4:47 pm    Post subject: Re: Isthere a KDE widget to share files between two users? Reply with quote

I don't know of a KDE widget to do that, but you could do it using Samba on the same machine. A bit of a kludge, I know, but should be achievable. You might need to have a separate public folder per user (e.g. Public-username1 and Public-username2) if you want read-only access in each direction.

EDIT: Below is a smb.conf file similar to the smb.conf in one of my installations (using only Broadcast NetBIOS name resolution for SMB shares, by the way), and it allows users user1 and user2 to share files with each other via their respective Public folders:

Code:
$ cat /etc/samba/smb.conf
[global]
;no need to specify 'smb ports', as ports 139 & 445 used by default
workgroup = HOME
netbios name = aspirexc600
case sensitive = no
browseable = yes

;If this machine becomes a Master Browser, the following parameter allows it to hold the browse list
browse list = yes

printcap name = cups
printing = cups

log file = /var/log/samba/log.%m
max log size = 50

security = user
map to guest = bad user

encrypt passwords = yes
passdb backend = tdbsam

domain master = no
local master = yes
preferred master = yes
; os level = 255 on my always-on server, so it is always the Master Browser. Therefore I
; will make os level = 127 on this desktop so it does not become MB unless my server fails.
os level = 127
name resolve order = bcast
wins support = no
dns proxy = no

;Listen for NetBIOS on Ethernet and Wireless interfaces
;Names of the interfaces found using ifconfig command
interfaces = eno1 wlp2s0

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = yes

[printers]
comment = All Printers
path = /var/spool/samba
guest ok = yes
printable = yes
create mask = 0700

[print$]
path = /var/lib/samba/printers
write list = @adm root
guest ok = yes

[Public-user1]
path = /home/user1/Public-user1/
guest ok = yes
writeable = yes
browseable = yes
valid users = user1

[Public-user2]
path = /home/user2/Public-user2/
guest ok = yes
writeable = yes
browseable = yes
valid users = user2

_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog


Last edited by Fitzcarraldo on Sun Feb 11, 2018 2:58 am; edited 3 times in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21606

PostPosted: Sat Feb 10, 2018 9:55 pm    Post subject: Reply with quote

Use a filesystem ACL to grant both users rwx to a root-owned directory outside the normal home directory hierarchy. Relax your umask (umask 022) and instead rely on permissions on the home directories to isolate the two users from each other (chmod 700 ~user1 ~user2). See man getfacl / man setfacl for usage details. Post back if you need more specific help (such as enabling ACLs on your chosen filesystem).
Back to top
View user's profile Send private message
Goverp
Veteran
Veteran


Joined: 07 Mar 2007
Posts: 1998

PostPosted: Sun Feb 11, 2018 2:23 pm    Post subject: Reply with quote

Gents, thanks for those two suggestions. I'm not 100% keen on either. I wonder how hard it would be to have a "LocalPublish" subclass a Plasma folder (assuming that means anything) to have a "setgroup" property that would be applied to anything dropped into it. Then create an appropriate "audience" group, and add the appropriate users.
_________________
Greybeard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum