Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here is what we are trying to accomplish:

  1. A client drops off a file on a Windows/Cygwin SFTP folder
  2. A Windows service scans the folder and processes the file

The problem:

  • The Windows service is getting a WinIOError when attempting to delete the file after processing. This is because the individual permissions on the file are set to read-only, despite the fact that the parent folder has permissions set to allow the Windows service full access to the content.

Any ideas on how we can set permissions on the file (either through code or through Cygwin) to allow full access to uploaded files?

share|improve this question

migrated from stackoverflow.com Dec 5 '09 at 3:51

This question came from our site for professional and enthusiast programmers.

    
i can't help but notice that if you use WinSCP along with something like NULL FTP Server, you dont need to write any code to accomplish what you are doing... do you really need to reinvent the wheel? –  djangofan Dec 11 '09 at 0:28

1 Answer 1

In Cygwin you set permissions with the standard Unix tools. To give full access to everyone on a file you would use:

$ chmod 777 [filename]

See chmod manpage.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.