Setup for SFTP File Permissions
Following are the instructions for setting your account to set permissions correctly when using SFTP.
- Log in to your Linux account using SSH.
- At the Prompt type the following pico .cshrc and press Enter
- This file will open for editing. Using the arrow keys scroll down looking for the line umask 077
- Once located place a # sign in front of that line. It should now look like; #umask 077
- Press the control key and X at the same time. This will exit. It will ask if you want to save modified buffer. Type yes. Then it will ask for file name to write. Press enter here to keep the file name the same.
- Now you should be back at the linux prompt.
- At the Prompt type the following pico .login and press Enter.
- This will open your .login file for editing. Using the arrow keys scroll to the bottom of the text. On a new line at the very bottom type umask 022
- Press the control key and X at the same time. This will exit. It will ask if you want to save modified buffer. Type yes. Then it will ask for file name to write. Press enter here to keep the file name the same.
- This should now allow you to upload files and they will automatically have the permissions set correctly.