I want to transfer from my local computer to my Linux (CentOs) VM through FileZilla. The file should be in this path in my Linux VM: `/etc/pki/ca-trust/source/anchors. But when I try to upload the file into this path, then this failure occurs

Error:  /etc/pki/ca-trust/source/anchors/test.docx: open for write: permission denied
Error:  File transfer failed

Can someone tell me where is my mistake? Please bear with me, because I am new to Linux.

  • Make sure you have permission to write into the destination directory. – Lambert Nov 11 at 7:59
  • It looks like a normal permission issue or it can be selinux. Which kind of session is it (ftp/SFTP/scp) and hat is the Backend (sshd or another server)? Which user you use? – EOhm Nov 11 at 8:01
  • I changed permission like this and it works: sudo chmod -R 777 /etc/pki/ca-trust/source/anchors. Is this the right way? – zenubeh Nov 11 at 8:41
  • No, that's not the right way. Using 777 as file/directory mode should not be used, it would be better to see what owner and group is set on the directory. Then see if your user can be member of that group and set mode g+w on the directory you need access to. If owner and group are both set to root see if it is feasible to use another group (one where your user is member of or even a new one). I would try to avoid write/execute access for other where I can. – Lambert Nov 11 at 9:02

Your Answer

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

Browse other questions tagged or ask your own question.