ProFTPd read-only

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
MonZon
Posts: 45
Joined: Fri Mar 31, 2017 6:07 pm

ProFTPd read-only

Post by MonZon »

How do I setup root access or create any other users with write capability?

Thanks.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: ProFTPd read-only

Post by Gord_W »

I'm not sure I understand your question ....

Dietpi should give you read-write access, but out of the box it will jail you in the root directory if that is what you have log on as.

To see the full file system you need to edit:

/etc/proftpd/proftpd.conf

And comment out:

#This will jail users in one directory -gw change
#DefaultRoot /root

Gordon Williams
MonZon
Posts: 45
Joined: Fri Mar 31, 2017 6:07 pm

Re: ProFTPd read-only

Post by MonZon »

Jailing is not the thing I'm talking about. I can't write anything to FTP with the root user or with another non-root user I've created for netatalk.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: ProFTPd read-only

Post by Gord_W »

Sorry, no idea what netatalk is. I presume that you have already check permissions on the directory and that you can log onto the device (rpi??) or ssh into it and read-write normally.

Gordon Williams
MonZon
Posts: 45
Joined: Fri Mar 31, 2017 6:07 pm

Re: ProFTPd read-only

Post by MonZon »

Yup, permissions are okay, ssh working well. Netatalk is an Apple File Protocol, mainly used to backup mac's via their Time Machine software.
tspoon
Posts: 2
Joined: Wed Apr 05, 2017 9:22 am

Re: ProFTPd read-only

Post by tspoon »

I'm having a similar issue. I run dietpi on a raspberry pi 2 B+, and just upgraded from 1.2x to 1.47. After the upgrade I cannot add or delete files on my attached usb hard drive using FTP or using Samba. Previously both methods were able to read, write and delete files. I also removed Samba and began to use NFS for LAN access, but access is still read only, despite configuring readwrite access.

Here is the relevant line in /etc/exports on the dietpi:
/mnt/usb_1 192.168.0.235(rw,sync)

Here is the relevant line in /etc/fstab on my desktop pc running debian:
192.168.0.100:/mnt/usb_1 /home/a***/dietpi_NAS nfs rsize=8192,wsize=8192,timeo=14,intr

Transmission bittorrent can still add and delete files. It seems to be some kind of security problem, but I'm not savvy enough to know where to look.

edit: looked a bit further and found that ProFTPd could in fact perform operations on some directories and not others. The ones it could work on were in the group 'root', and the ones it could not were in the group 'nogroup' (which did not exist). I used chown to let root be the owner for all directories and files on the hard drive. This solved the FTP access problems, and transmission still works ok, but NFS still did not work as I don't log in as root to my desktop. To solve that I changed permissions to 0777, not ideal, but it worked. Ideally I should go back to Samba and mount the drive with a login name and password to gain root access from my desktop pc, which I'll get round to sometime.

I think in the past when I have been using Samba to access and transfer files in, they came in owned by 'nobody' and in 'nogroup', possibly when using Grsync with incorrect switches. I'm still not sure why it worked okay before and then became a problem after the upgrade, but at least I have a solution.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: ProFTPd read-only

Post by Fourdee »

hi,

Could be a permissions issue, try reapplying required permissions to userdata folder:

Code: Select all

/DietPi/dietpi/dietpi-software setpermissions
Restart services

Code: Select all

dietpi-services restart
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply