[GH-ISSUE #806] Accessing home directory of another user #547

Closed
opened 2026-05-05 06:06:21 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @graywolf on GitHub (Sep 23, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/806

I'm in need of accessing home directory of another user (/home/shared), but I have no idea how to achieve that. Tried whitelisting, didn't help. from --debug I would guess connection to Cleaning /home directory, but I didn't find nothing like --no-clean-home or something to supress that :/

How can I achieve this?

I guess mount --binding it to /media or somewhere should work, but is it possible without it?

Originally created by @graywolf on GitHub (Sep 23, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/806 I'm in need of accessing home directory of another user (`/home/shared`), but I have no idea how to achieve that. Tried whitelisting, didn't help. from `--debug` I would guess connection to `Cleaning /home directory`, but I didn't find nothing like `--no-clean-home` or something to supress that :/ How can I achieve this? I guess `mount --bind`ing it to `/media` or somewhere should work, but is it possible without it?
gitea-mirror 2026-05-05 06:06:21 -06:00
Author
Owner

@Fred-Barclay commented on GitHub (Sep 23, 2016):

It's an obvious question but needs asking anyways...
You have system permissions to access that directory ordinarily, right?
If so, do you have to gain root permissions first? (su or sudo)

<!-- gh-comment-id:249308728 --> @Fred-Barclay commented on GitHub (Sep 23, 2016): It's an obvious question but needs asking anyways... You have system permissions to access that directory ordinarily, right? If so, do you have to gain root permissions first? (`su` or `sudo`)
Author
Owner

@graywolf commented on GitHub (Sep 24, 2016):

I complete understand, sometimes it's really something dumb like this :) But not in this case. I have permissions to access that folder, yes. Issue here mostly is that I don't even see that folder. /home contains only folder for current user under which I'm running the firejail. This seems to be by design (it's reasonable default), I would like to know how to suppress this behaviour though.

<!-- gh-comment-id:249341366 --> @graywolf commented on GitHub (Sep 24, 2016): I complete understand, sometimes it's really something dumb like this :) But not in this case. I have permissions to access that folder, yes. Issue here mostly is that I don't even see that folder. `/home` contains only folder for current user under which I'm running the firejail. This seems to be by design (it's reasonable default), I would like to know how to suppress this behaviour though.
Author
Owner

@netblue30 commented on GitHub (Sep 24, 2016):

Will do!

<!-- gh-comment-id:249361422 --> @netblue30 commented on GitHub (Sep 24, 2016): Will do!
Author
Owner

@graywolf commented on GitHub (Sep 25, 2016):

@netblue30 I'm not really sure if I will try to contribute to this project (let's say it outright, my C sucks), but from looking through the source code, should it suffice to add some argument to control if sanitize_home should be called (at 0ecf71a884/src/firejail/restrict_users.c (L342) )?

So add something like --nocleanhome command line argument and propagate it in there?

<!-- gh-comment-id:249397584 --> @graywolf commented on GitHub (Sep 25, 2016): @netblue30 I'm not really sure if I will try to contribute to this project (let's say it outright, my C sucks), but from looking through the source code, should it suffice to add some argument to control if `sanitize_home` should be called (at https://github.com/netblue30/firejail/blob/0ecf71a884ac1424bd458df914aed0e837e3cfc0/src/firejail/restrict_users.c#L342 )? So add something like `--nocleanhome` command line argument and propagate it in there?
Author
Owner

@netblue30 commented on GitHub (Sep 25, 2016):

All set in git, use --allusers.

<!-- gh-comment-id:249420074 --> @netblue30 commented on GitHub (Sep 25, 2016): All set in git, use --allusers.
Author
Owner

@graywolf commented on GitHub (Sep 25, 2016):

that was quick, thank you :)

<!-- gh-comment-id:249421585 --> @graywolf commented on GitHub (Sep 25, 2016): that was quick, thank you :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#547
No description provided.