Comments (10)
Sorry let me re-describe the issue.
I found that the problem should be after reboot, /run/media/$USER
is removed, leaving only /run/media
in the system, and tomb open
will recreate /run/media/$USER
will 711
permission.
Switch it to 755
manually should be fine, but I don't know if it is security concern by design.
I cannot find anything about it in the source code mount_tomb()
section. So I have no idea why it created with 711 permission.
from tomb.
Created a /media
folder to use tomb open
and all problem solved.
from tomb.
See the comments to this commit: 843b7fd
It was different and changed somewhere on the road. I had planned to look into this, but it was kinda forgotten. As I was the only one who was "bothered" by it :D
from tomb.
And regarding /media
: Using this location has some other security related implications. One of the reasons it got in general abandoned in favour of /run/media/<user>
from tomb.
hi @amalgame21 ! thanks for the report and @Narrat for keeping track of this issue through earlier comments. I would like to look into this and improve if possible, perhaps just a non-recursive chown on mount dir in /var/run ?
from tomb.
Maybe. At least this was done in the past?
What bothers me still, is why it seemed to work with chown
'ing the file inside the tomb. Will try to do some test scenarios this week.
I also remember that it made a difference if /run/media/<user>
was already existing (due to mounting an USB drive or else) or not.
from tomb.
Mounting in run/media
seems to involve ACL (Access Control Lists).
Mounting with tomb produces the following dir structure: run/media/$user/<mount>
And the dir $user
has the following permissions:
/run/media/
$ ls -l
insgesamt 0
drwx--x--x 3 root root 60 7. Jan 20:12 testuser
After removing the folders and mounting something with for example udiskctl
the dir structure is the same: run/media/$user/<mount>
.
But the permissions differ:
/run/media/
$ ls -l
insgesamt 0
drwxr-x---+ 3 root root 60 7. Jan 20:26 testuser
There is the additional +
which tells us about existing ACL:
/run/media/
$ getfacl testuser
# file: user
# owner: root
# group: root
user::rwx
user:testuser:r-x
group::---
mask::r-x
other::---
from tomb.
@Narrat Yes, that's also what I discovered between the mount point permission of udiskie
mounting USBs and tomb
mounting tomb files.
I did not know what the +
stand for in the udiskie
case, but it seems magically make the mount point readable to users other than root, although the permission was set to 750
.
ACL is a new word to me, thanks for mentioning this.
from tomb.
I wonder, shall we then use setfacl
on the /run/media/$USER/$tombname
mount folder with something like:
setfacl --set=u::rwx,u:$USER:rwx,g::---,g:$USER:---,m::---,o::---
perhaps printing it in log messages to ease adjustments by hand?
from tomb.
Imo yes. But should it only be used on /run/media
? Or is there also a gain if it used on other mount locations? And there should probably a check if the filesystem supports ACL.
Regarding the command itself. Shouldn't setfacl --set=u:$USER:rwx
be enough? Dunno about setting the group, because that varies from distribution to distribution. Debian and such create a group for the username. Others have a generic group users
. And if I open something with secrets only I want to be able to see the contents.
from tomb.
Related Issues (20)
- reimplementation of cat fails to work for some inputs HOT 1
- No session for cookie HOT 2
- A minor error prompt for hostname HOT 4
- DBUS_SESSION_BUS_ADDRESS not set when running tomb via .desktop launcher HOT 1
- Too much noise about sudo in console output HOT 1
- Space characters in bind-hooks HOT 6
- losetup: cannot find an unused loop device HOT 4
- Restore GPG recipient tests
- fsck error "UNEXPECTED INCONSISTENCY" HOT 1
- tomb complains about zramswap HOT 3
- btrfs on small tombs HOT 2
- Tomb 2.9.0 as root with smartcard [Bug? + Workaround] HOT 3
- Tomb `online / offline` command for LAN sharing via samba
- Question: How secure is storing the secret.tomb file along with they key file relying only on password?
- Support .wav file in bury/exhume mode which `steghide` already support HOT 3
- age support for key encryption
- `ctrl+c` not working to cancel `sudo` prompt
- Duplicate password prompt when `udiskie` was installed. HOT 1
- tomb index / search and mlocate HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tomb.