android-file-transfer-linux icon indicating copy to clipboard operation
android-file-transfer-linux copied to clipboard

Owner of files downloaded from Android device on local machine

Open probonopd opened this issue 3 years ago • 1 comments

It seems like Android File Transfer for Linux requires to run as root to access the Android device (at least on FreeBSD). Running it as root seems to have the unintended side effect that files downloaded from the device to the desktop results in files on the desktop that are owned by root, and hence cannot be modified nor deleted by the normal user.

Is there a way around this, e.g., an environment variable that one could pass to Android File Transfer for Linux that would define the username which should be used when creating files on the local desktop machine?

probonopd avatar Feb 22 '21 19:02 probonopd

Are you running it using sudo? sudo provides SUDO_UID and SUDO_USER and it may help it. I can add it, but ideally I'd like to provide an instruction for FreeBSD users how to do it properly.

AFTL does not require any super user capabilities, it just needs access to the raw usb device files. Normally they may have some special group, e.g. usb, so you can add this group to your user group list. And if it does not, maybe we need to fix it in FreeBSD :wink:

whoozle avatar Jul 21 '21 07:07 whoozle