How to set file permission for linux host under windows?

For example, I want the file to have a resolution of 644 automatically, when I downloaded it to my Linux host, it is under windows before downloading. How can i do this?

Btw, I use Filezilla to download

Updated: before posting this question, in fact, I never thought it was impossible. But since I have many WordPress sites, I remembered that I never needed to set permission for Wordpress files. So I did an experiment,

  • download the new wordpress package, zip format (under the windows)
  • downloaded it to my Linux host,
  • unzip
  • check permissions on these files

I saw that all files had their right to the truth, some 644, about 755, exactly as described in the wordpress document

+3
source share
5 answers

I think this is not possible in most cases.

Could you give more information on how you download? FTP, SFTP, SMB? :-)

For example, for FTP, you can configure an FTP server to provide all new 644 umask files (see this example for ProFTPd)

For SFTP, the client can change permissions after booting, because in any case, it has access to SSH.

+4
source

You can not. The permission is not written to the file itself, but to the file system. Therefore, this must be done after downloading the file.

+1
source

, FTP , FTP- (FileZilla) , , FTP .

" ", 644 . . , FTP-, , . , , - 755, 644, , .

0

-, ? , ?

umask?

0

, "quote" FTP Windows, FTP-.

Assuming your Linux FTP server supports SITE UMASK ...

eg. ftp> quote UMASK 111 SITE

This will be equivalent to doing: chmod 666 * on the Linux command line, but via FTP on Windows.

0
source

Source: https://habr.com/ru/post/1750140/


All Articles