Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set file permission for linux host under windows?

For example, i want a file has permission of 644 automatically when i uploaded it to my linux host, before upload, it is under windows. How could i do this?

Btw, i use Filezilla for upload

Updated: Before post this question, actually, i ever thought it is impossible too. But, as i has many wordpress sites, i remembered that i never need to set permission for wordpress files. So i did an experiment,

  1. dowload a new wordpress package, zip format (under windows)
  2. uploaded it to my linux host,
  3. unarchive
  4. check permissions of these files

I saw all files had their permission naturely right, some 644, some 755, exactly as described in wordpress document

like image 911
Edward Avatar asked Jun 15 '10 15:06

Edward


1 Answers

I think this is not possible in most cases.

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

For example for FTP you could configure the FTP server in order to give all new files the 644 umask (see this example for ProFTPd).

For SFTP, the client might be able to change the permissions after the upload, because it has SSH access, after all.

like image 122
pableu Avatar answered Nov 01 '22 13:11

pableu