0

I am having some problems with FTP using Sentora with CentOS 6.2 PROFTPD server installed by sentora (old zpanel).

FTP account created by sentora panel with full privileges, the SSH transfers by WINSCP works normally! But in filezilla (or other ftp program, even notepad ++) I can't upload or edit any file.

Filezilla trying to upload one image:

Estado: Conexão estabelecida, esperando mensagem de boas-vindas...
Estado: Servidor sem segurança, não suporta FTP sobre TLS
Estado: Conectado
Estado: Obtendo lista de pastas...
Estado: Directory listing of "/" successful
Estado: Conectando 107.155.87.52:21...
Estado: Conexão estabelecida, esperando mensagem de boas-vindas...
Estado: Servidor sem segurança, não suporta FTP sobre TLS
Estado: Conectado
Estado: Iniciando o envio de C:\Users\Isleno\Desktop\images.jpg
Comando:    CWD /loja
Resposta:   250 CWD command successful
Comando:    TYPE I
Resposta:   200 Type set to I
Comando:    PASV
Resposta:   227 Entering Passive Mode (107,155,87,52,134,203).
Comando:    STOR images.jpg
Resposta:   550 images.jpg: Permission denied
Erro:   Erro crítico na transferência de arquivo 

Filezilla trying to edit one file name:

Estado: Renomeando '/loja/.htaccess.txt' para '/loja/a.htaccess.txt'
Comando:    CWD /loja
Resposta:   250 CWD command successful
Comando:    RNFR .htaccess.txt
Resposta:   350 File or directory exists, ready for destination name
Comando:    RNTO a.htaccess.txt
Resposta:   550 Rename a.htaccess.txt: Permission denied

How to fix it? I already tried to restart PROFTPD service but the error continues, I also can't change permissions of a file by filezilla.

EDIT:

Asking about my problem in a ticket my host suggest me trying to change the owner of files. How to do it?

  • is the username and password different than what you use to login via SSH? – Simon Hayter Feb 23 '15 at 10:28
  • Hi bybe! I solved the problem with owner change – Isleno Ituriel Feb 23 '15 at 11:05
1

After search I see really a lot peoples with the same problem. Please check the OWNER of file, in my case the owner was ROOT.

To solve the problem just do it:

 chown -R apache:apache /public_html/your_folder/sub_folder
  • You should opt to use SFTP rather than FTP. As its more secure and uses SSH type connection. – Simon Hayter Feb 23 '15 at 11:08
  • Also, check the user that your FTP server uses. It should be a sand-boxed user and not root or any other privileged user. – closetnoc Feb 23 '15 at 17:40
0

The permission number is a major issue. Each numerical position represents different classes of people beginning with the user, then all users in a defined group, then everyone else respectively. Each digit in that position represents a set of bits that are broken down as the following:

bit 0 is execute. bit 1 is write. bit 2 is read.

So if you have a folder labelled with user "abc" and group "apache", and you used 550 permissions then:

User abc has read and execute permissions because:

2 to the power of (bit) 0 is 1 for execute + 2 to the power of (bit) 2 is 4 for read. That equals 5 for the first digit.

Everyone in the group apache also has read and execute permissions. The math is the same except that in this case, the second digit is 5.

Now the last number 0 means everyone else (meaning everyone but the user and the people in the group) has no permissions to do anything with the item.

That's how the permissions 550 work.

755 is the best set of permissions to use. That way, the owner has full privileges, and everyone else can read and execute the file (because in the user digit, all three bits are set).

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.