1

I'm generally new to this, but I have a server that I'm working on remotely. I'm connecting to it (Ubuntu Server 16.04) via SSH (vsftpd, to be specific) on my mac, but it wont let me edit files? I've looked around and edited permissions but it still wont work.

I'm trying to edit ./beta/ :

user@the-world-meme-database:/var/www$ ls -l
total 12
drwxrwxrwx 4 www      www-data 4096 Oct 27 20:31 beta
drwxr-xrwx 3 www-data www-data 4096 Oct 27 14:50 html
drwxr-xrwx 3 www-data www-data 4096 Oct 27 12:05 webdav

and my vsftpd.conf (Without comments) :

listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
#local_umask=022
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES
#chown_username=www
#xferlog_file=/var/log/vsftpd.log
#xferlog_std_format=YES
#idle_session_timeout=600
#data_connection_timeout=120
#nopriv_user=ftpsecure
#async_abor_enable=YES
#ascii_upload_enable=YES
#ascii_download_enable=YES
#ftpd_banner=AyyLmao FTP Server.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#chroot_local_user=YES
#chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#ls_recurse_enable=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
#utf8_filesystem=YES
allow_writeable_chroot=YES
chmod_enable=YES
  • 1
    You are trying to edit a directory? Not all FTP combinations allow edit. – closetnoc Oct 28 '16 at 1:17
1

As mentioned by master sensei closetnoc not all FTP connections allow that.

In addition, as a Mac user I have noticed that not all FTP clients will allow editing. The best results I have gotten is using Fetch FTP client for Mac which there is also a Ubuntu version.

This has allowed me to edit what is editable.

  • I am working from old memory, however, FTP over SSH specifically does not allow editing. If you want to edit, use SSH. Duh... ;-) Feel free to correct me if I have that wrong - anyone! Cheers!! – closetnoc Oct 28 '16 at 2:58
  • Yes, I am excluding SSH all together in my statement. Direct FTP is my best results editing directories and files when allowed. – norcal johnny Oct 28 '16 at 3:00
  • I noticed the SSH in the OPs Q and I had to respond somehow. Perhaps I should have posted it under the Q. I was really directing the comment in general. Cheers Mate!! – closetnoc Oct 28 '16 at 3:04
  • I should have probably commented myself on the SSH as well since it is in the question. I just seem to have problems whenever running FTP in general via any method other than directly. Hope all is well with you! :) – norcal johnny Oct 28 '16 at 3:06
  • Alls well. Dragging my ass. Believe me, he does not appreciate me dragging him around. (donkey) I have been out most of the afternoon and evening. Too tired to trust my logic too much. Oh well. Tomorrow is another day. How are you doing?? Well? Leaving your poor ass in the field? I recommend it. – closetnoc Oct 28 '16 at 3:10
1

This drwxrwxrwx lets me know that beta is readable, writable and can be exercuted by all users of any groups, however what it doesn't tell me is that the files or folders within them folders use the same permissions.

Please confirm that you have done chmod recursively using:

sudo chmod 777 -R /var/www/beta

If not, then it should resolve your issue.

1

Only run this command on your terminal

chown -R username /var/www/html

and then restart the vsftpd service by using below command

sudo /etc/init.d/vsftpd restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.