Open for write permission denied ошибка передача файла потерпела неудачу

I’m on Windows client and I’m just starting to use FileZilla to SFTP local files on a remote server .. an Amazon EC2 instance running Ubuntu.

On my windows client I have Putty Pageant running as source of public keys.

Now the problem I’m having must be very basic .. «permission denied» leading to failed transfers

Error: /usr/lib/nx/nxsetup: open for write: permission denied
Error: File transfer failed

I right click the target server directory to check read/write permissionbs.

The directories in both source (localhost) and target (EC2 instance) can be navigated by FileZilla.

I tried to set attributes read/write for the entire target folder

but I get this ..

Status: Set permissions of ‘/usr/lib/nx’ to ‘777’
Command: cd «/usr/lib»
Response: New directory is: «/usr/lib»
Command: chmod 777 «nx»
Error: set attrs for /usr/lib/nx: permission denied

I have tried going to target server to change permissions of target folder /usr/lib/nx

sudo chmd +w /usr/lib/nx/

Also I’ve tried WinSCP but get identical errors ..

Cannot create remote file ‘/usr/lib/nx/nxsetup’

Permission denied
Error code: 3

————————————-

What is the basic configuration I’m missing just to transfer files from A to B using SFTP?

I’ve tried running FileZilla in administrator mode.

Is this probably a problem of permissions at the server end (Ubuntu) rather than in FileZilla?

————————————-

Here is a copy of the log file .. (EC2 path edited)

2011-11-14 21:00:53 3056 3 Status: Connecting to ec2-xx-xxx-xx-xxx.eu-west-1.compute.amazonaws.com…
2011-11-14 21:00:53 3056 3 Response: fzSftp started
2011-11-14 21:00:53 3056 3 Command: open «ubuntu@ec2-xx-xxx-xx-xxx.eu-west-1.compute.amazonaws.com» 22
2011-11-14 21:00:54 3056 3 Status: Connected to ec2-xx-xxx-xx-xxx.eu-west-1.compute.amazonaws.com
2011-11-14 21:00:54 3056 3 Status: Retrieving directory listing…
2011-11-14 21:00:54 3056 3 Command: pwd
2011-11-14 21:00:54 3056 3 Response: Current directory is: «/home/ubuntu»
2011-11-14 21:00:54 3056 3 Command: ls
2011-11-14 21:00:54 3056 3 Status: Listing directory /home/ubuntu
2011-11-14 21:00:54 3056 3 Status: Calculating timezone offset of server…
2011-11-14 21:00:54 3056 3 Command: mtime «.bashrc»
2011-11-14 21:00:54 3056 3 Response: 1317454718
2011-11-14 21:00:54 3056 3 Status: Timezone offsets: Server: 0 seconds. Local: 0 seconds. Difference: 0 seconds.
2011-11-14 21:00:54 3056 3 Status: Directory listing successful

У меня есть сервер ubuntu 20.04

Мне нужно изменить один файл в etc, можно ли это сделать через filezilla?
Когда пытаюсь это сделать выдаёт ошибку:

Ошибка: /etc/sysctl.conf: open for write: permission denied
Ошибка: Передача файла потерпела неудачу


  • Вопрос задан

    более года назад

  • 266 просмотров

Пригласить эксперта

Можно, при условии, что etc/ лежит на ftp сервере, с соответствующими правами.

можно, но лучше так не делать.
только у файла /etc/sysctl.conf должно быть разрешение на редактирования для той системы доступа к файлам на сервере, через которую подключается filezilla.
для фтп это будет пользователь, из-под которого производится вход на фтп-сервер.
для
-rw-r—r— root root /etc/sysctl.conf
это только пользователь root. либо заходить на фтп под рутом, что сильно не секурно.
либо дать +w для группы и пользователя, из-под которого заходим в фтп, добавить в онную группу, что чуть-чуть более секурно :)

учитывая «защищенность» фтп, лучше так не делать.
лучше уж sftp/ssh с авторизацией по ed25519 ключу

можно, для этого нужно подключится под рутом (root)

=== сервер ubuntu 20.04 ===
должен быть установлен и запущен sshd сервер
а также в файле /etc/ssh/sshd_config
найти и установить значение
PermitRootLogin yes
после чего перезапустить sshd.service
sudo systemctl restart sshd.service

=== filezilla ===
протокол: SFTP
Пользователь: root


  • Показать ещё
    Загружается…

22 июн. 2023, в 00:59

8000 руб./за проект

22 июн. 2023, в 00:56

8000 руб./за проект

22 июн. 2023, в 00:39

12000 руб./за проект

Минуточку внимания

You can make a test-directory and chmod this so everyone can read and write in it.

mkdir test 
chmod 777 test

Now you put a file in it with ftp and look what user and group needs access.

cd test
ls -l

Once you know username and group you either have to change ownership of the directories in which you want your ftp users to write or you can make the ftpuser part of the group who owns the directories.

chown :ftpgroup dir_to_write (you can add -R for recursive but do not do this on system dirs!)  

or:

adduser ftpuser group_who_owns_directory

If you only want to write to the html dir I would probably add the ftpuser to the html group so you do not get conflicts between the different processes on ownership.

I have created a user and a group only for SFTP and when I try to transfer a file with Filezilla in /var/www I have this error:

Open for write: permission denied

I have configured sshd_config like this :

#Subsystem Sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp

Group sftp_only Match
ChrootDirectory /var/www
ForceCommand internal-sftp
X11Forwarding No
AllowTcpForwarding No

/var/www and sub directories are chown root:root and chmod 755

SELinux is disabled.

Any idea ?

masegaloeh's user avatar

masegaloeh

18.2k10 gold badges57 silver badges106 bronze badges

asked Mar 3, 2015 at 16:08

Olaf's user avatar

1

The permission of /var/www does not permit the chrooted-user to create files in it.
That is correct and by design.
You must create a folder inside of /var/www with the proper rights of the user.

/var/www can not be writeable for the user.

answered Mar 3, 2015 at 16:20

faker's user avatar

fakerfaker

17.5k2 gold badges60 silver badges69 bronze badges

mephistop

Posts: 2
Joined: Sat Aug 29, 2015 4:13 pm

Permission denied

Добрый день,

Через ftp открываю файл php.ini редактирую то что нужно , но когда заливаю обратно на сервер пишет:
Ошибка: /etc/php.ini: open for write: permission denied
Ошибка: Передача файла потерпела неудачу

Через SSH тоже зашел через root, вбил команду /etc/php.ini в ответ пишет это:
-bash: /etc/php.ini: Permission denied

Как решить проблему? Откуда нужно подправить права?

CentOS 6
Vesta

Спасибо.


Alex Connor

Support team
Posts: 1047
Joined: Fri Mar 21, 2014 7:49 am
Contact:

Os: CentOS 6x
Web: apache + nginx
Re: Permission denied

Post

by Alex Connor » Sat Aug 29, 2015 8:04 pm

используйте sftp подключение дя пользователя root, либо


mephistop

Posts: 2
Joined: Sat Aug 29, 2015 4:13 pm

Re: Permission denied

Post

by mephistop » Sat Aug 29, 2015 8:31 pm

Alex Connor wrote:используйте sftp подключение дя пользователя root, либо

Большое спасибо. Через SSH сделал.


Alex Connor

Support team
Posts: 1047
Joined: Fri Mar 21, 2014 7:49 am
Contact:

Os: CentOS 6x
Web: apache + nginx
Re: Permission denied

Post

by Alex Connor » Sat Aug 29, 2015 8:48 pm

Обращайтесь ;-)



Возможно, вам также будет интересно:

  • Open all 32 dll ошибка
  • Open a folder or workspace file open folder ошибка vs code
  • Open a folder or workspace file open folder live server ошибка
  • Opel код ошибки p0170
  • Opel zafira сброс ошибок педалями

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии