M
M
MynameIsBoxyy2020-12-25 00:13:56
linux
MynameIsBoxyy, 2020-12-25 00:13:56

How to allow a user to edit folders/files on an external hard drive?

Hello. Ubuntu. I connect an external hard drive. Mounted in /media.
The ls -l /media command shows that the user alexandr and everyone in his group (if I understand correctly) can edit information on the disk (if I understand correctly) drwxrwxrwx+ 416 root root 20480 Dec 24 23:28 alexandr
How to add another user rights to edit an external disk? You need to add www-data. Adding www-data to the alexandr group does not help. Needed for Apache and PHP.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Adamos, 2020-12-25
@Adamos

www-data user is a webserver?
It cannot write anything outside the web server directory, for elementary security reasons.

T
Talyan, 2020-12-25
@flapflapjack

Do not read below - I write garbage. You have chmod 777 there
. Can you really change files on the disk? Often, the Windows FS is mounted as ReadOnly, and you need to run ntfsfix so that the partition can be mounted as writable.
you have the owner of the folder - root, because you mounted the disk as root and not through sudo.
www-data is not in the root group.
You need to do
sudo chown -R www-data:www-data /media
then add yourself to the www-data group
sudo usermod -aG www-data alexandr

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question