Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodes mounted as root, removal possible as regular user #310

Open
laur89 opened this issue Jun 16, 2022 · 1 comment
Open

Nodes mounted as root, removal possible as regular user #310

laur89 opened this issue Jun 16, 2022 · 1 comment

Comments

@laur89
Copy link

laur89 commented Jun 16, 2022

Hi,
I mounted the phone and got an error:

aft-mtp-mount ./phone/
Device::Find failed:Device is already used by another process

Having assumed the mount failed, I deleted the mountpoint:

rm -rf ./phone/

Turns out the mount had not failed, and data was lost.

How is it possible that rm succeeded? Mounting and traversing the file-tree shows all the directories-files are owned by root, and others have only read access.

Running android-file-transfer 4.2-1 on Debian testing.
Android 11.

@whoozle
Copy link
Owner

whoozle commented Jul 10, 2022

Interesting, fuse does not (did not?) allow other users to do anything with mounted directory by default. What fuse version do you have? Did you pass -o allow_other to mount?

With fuse you don't have to do wrt permissions, they are returned as a part of stat structure.
Modes for Files/Directories are :

		static constexpr unsigned 		FileMode 		= S_IFREG | 0644;
		static constexpr unsigned 		DirectoryMode	= S_IFDIR | 0755;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants