0

Last night, I installed a program called ScreenCloud on my Fedora 20 laptop. This application uploads screenshots I take on my computer to a number of different places, one of the options being to my own private server via SFTP.

I wanted to have a custom image URL for my screenshots, so I tried setting this up on my laptop. I successfully installed the program to my laptop and input the details to my private CentOS 6.5 server. After verifying that the program was successfully able to connect via RSA key authentication, I initiated the upload process to my server only to get an Unable to write file! Check file permissions.

For testing purposes, I initially put the file in the home directory of the user the application was logging in as (for conversation's sake, we'll call the user jflory7). I received the same Unable to write error as before.

Ideally, I would like to put this file in a specific web directory. I believe I have the permissions set up correctly in the web directory, but the thing that has me concerned is that the program was unable to upload the screenshot in my own home directory.

I have already referred to this and this question for research purposes, but they were unable to help me. If more information is needed, please comment.

0

Solution

ScreenCloud defaulted the name of the file as something using slashes, e.g. http://example.com/Screenshot-on-12/31/69-at-12-00.png, which the Linux server could not handle because the slashes weren't acceptable characters. The solution was manually changing the screenshot name to exclude slashes, and after that point, uploading screenshots worked fine.

0

I'd try creating a user with access to the web directory, which is writable by ScreenCloud. Make sure that the directory that you are saving to includes the entire directory:

example

Next, create a user that has access to the web directory. Do

useradd screencloud

and

passwd screencloud

then you can grant all permissions on the www directory to the user with

chown -R screencloud:screencloud /var/www/

The user will now have an SFTP server configured for itself, which you can use to upload files.

  • But I also need Apache (user apache or www-data depending on your OS) to retain access to the web directory so that anonymous guests browsing my web server have permissions to browse around without problems. – Justin W. Flory Jun 26 '14 at 2:34
  • Have you tried uploading via the apache or www-data user? I've created the new user and it didn't reset my apache and www-data users, and I can still browse my web content just fine. – kill_da_trolls Jun 28 '14 at 20:55
  • I could try this, but I only want one user to be able to log into my server (e.g. jflory7) via RSA key authentication. In order for me to use that method, I would have to create the apache user so that it could be logged into, and then I would have to make it one of the users that can be logged into directly so that I could use a program such as FileZilla. Ideally, it would be preferred if I could just use my existing user to upload. As a test, I also tried chmod 777 and chown user:user to the directory I was writing to, and it didn't seem to have any effect. – Justin W. Flory Jun 29 '14 at 19:44

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.