Creating a bug report/issue
I have searched the existing open and closed issues
Required Information
- DietPi version |
G_DIETPI_VERSION_CORE=9 G_DIETPI_VERSION_SUB=7 G_DIETPI_VERSION_RC=1 G_GITBRANCH='master' G_GITOWNER='MichaIng'
- Distro version |
bullseye 0
- Kernel version |
Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
- Architecture |
arm64
- SBC model |
RPi 4 Model B (aarch64)
- Power supply used | (EG: 5V 1A RAVpower)
- SD card used | SanDisk
Additional Information (if applicable)
- Software title | ProFTPD
- Was the software title installed freshly or updated/migrated? Freshly installed today
- Can this issue be replicated on a fresh installation of DietPi?
Expected behaviour
No FTP write permission in /var/www folder
Actual behaviour
I recently installed ProFtpd to access folder /var/www but I haven’t write permission, few days ago I inadvertently deleted the “www” folder and I don’t know if I recreated it correctly.
Extra details
None
by default ProFTPd uses user and group dietpi
, but /var/www
is owned by root
or www-data
. YOu would need to change the permissions or ownership to let write ProFTPd to this path.
What is the output of
ls -la /var/www
?
Oh sorry, I forgot to paste it:
root@DietPi:~# ls -la /var/www
total 24
drwxr-xr-x 3 www-data www-data 4096 Sep 9 15:01 .
drwxr-xr-x 12 root root 4096 Sep 6 14:56 ..
-rw-r--r-- 1 www-data www-data 10701 Sep 6 15:03 index.html
drwxr-xr-x 11 www-data www-data 4096 Sep 9 15:01 phpmyadmin
Thank you in advance!
Which user you use to login via FTP? Is it user dietpi
?
Your problem is that /var/www
belongs to the user www-data
. This is the only user who can write to this folder. To allow the user dietpi
, you must add him to the group www-data
and adjust the group permission to 777.
Okay, it works now, but I think it would have been sufficient to add the user to the group.
However, I do not know originally the folder to which user and group was assigned. Because I recreated it and assigned it to www-data. Can you check yours?
Thank you!
User group www-data
is correct and you need to add write permission to the group. Otherwise you are not able to write into the folder via group permissions set