Graphicsmagick file permissions on uploaded files in Linux - linux

I'm having some trouble with Graphicsmagick (GM) not having permissions, on my Ubuntu 12.04 server, to change images uploaded from my node app.
I've changed the folder permissions where it gets uploaded to 777 (drwxrwxrwx) (just as an experiment, for now), but the files that are uploaded gets 664 (-rw-rw-r--).
The image is uploaded to /uploads/temp/, gets moved and resized with GM to /uploads/public/project1/thumbs
The project1 folder is created by the node app and will have 775 (drwxrwxr-x) permissions...
So, clearly not understanding how folder permissions work in Linux I turn to Stack to see if someone can shed some light on the matter.
How can I make GM have the permission to change the images? Can I put GM in a user group with higher permissions or how would I go by this problem?
Thanks!

I just fixed this exact same problem for my project. The uploaded image is allowed to have 664 as the permission. Your problem is likely that your path is wrong. If you can't find what is wrong with the path, try switching the path separators from \ to /
– TFischer
It's embarrassing but you are correct. The path to the file had changed so GM couldn't find it. – mottosson

Related

Using tar -zcvf against a folder creates an empty compressed file

I am ssh'ed into an Acquia server trying to download some files. I need to backup these files for local development (to get user uploaded images mainly).
I am using the following command:
tar -zcvf ~/download/stage-files_3-19-2015_1344.tar.gz files/
I have read/write access to the download folder. I created that folder. I am in the parent folder of "files". And permissions to that folder are 777.
I was able to run this the other day with no issues. So I am very confused as to why this is happening now.
Actually I just figured this darn thing out. Must have run out of disk space because once I removed a prior compressed backup of the files it started running just fine. Dang disk quotas. Sorry guys.

ModX Evo: Cannot create images folder

I have just installed Evo 1.0.15 but get the following error when I try to add an image or file link in TinyMCE:
Cannot create images folder
This occurs when the file browser window opens.
I have checked and there is an images folder both in my assets and root directories. Both have open permissions (777).
Does anyone know what is causing this and how I can fix it?
Turns out this was because the images directory path was incorrect in the Configurations list

Custom InstallAnywhere location for .com.zerog.registry.xml file on linux

I'm running into an issue where I do not have write access to the /var directory on a UNIX environment, and InstallAnywhere doesn't provide me the option of writing the .com.zerog.registry.xml to any other location for a product installation. Is there a parameter out there that allows for this file to be written to a different directory?
According to the IA docs:
If logged in as root, the global registry is located in \var.
If logged in as a user, it is located in the user’s home directory.
So, if you're running as root and can't write to /var, it sounds like a permissions problem with the /var directory, independent of IA. Check the permissions on /var.
If you're running as a non-root user, then the registry shouldn't be going to /var, but to $HOME/.com.zerog.registry.xml (FWIW, I just checked one of our test Linux boxes and found .com.zerog.registry.xml under both /var and under test-user $HOME directories. The docs appear to be correct).
I've also seen some very strange behavior if IA is low on space in $TMP. Make sure you have plenty of space there.
Also, have you considered running the installer with sudo, or the graphical equivalents kdesudo (KDE) and gksu (Gnome)? Those might get you where you want to go.

Timthumb and tmp folder

Recently a web space ran out of space. Now I found out that the tmp folder outside the home directory was full of these files: timthumb_tmpimg_00BZyC. Some of these files can't be opened. Why is timthumb storing files outside the home directory? The tmp folder is on the same level like dev, etc, proc, root, sys and so on.
Has the site a security problem? Are some settings incorrect?
Timthumb is used in version 2.8.5 by the Wordpress plugin vSlider. The site also uses Simple Post Thumbnails which uses Timthumb in v. 2.7. I replaced both with Timthumb 2.8.10.
Or does it have to do with temporary files created by timthumb, which were never deleted?
/tmp is intended to be world-writeable -- though if you try the following:
ls -l / | grep tmp
you'll see that it has the sticky (t) bit on, meaning that files created by a user can only be deleted by the same user or a superuser, to prevent different users from clobbering each other's temporary files. This is similar to the %SYSTEMDIR%\TEMP directory in Windows.
So it's not a security problem on the Linux side, though it could be a misconfiguration or a bug on the part of the WordPress plugin you're using. Is there an option limiting how many thumbnails it keeps?

Drupal does not recognize my website has been installed

After a successful Drupal install, I was trying to follow the security recommendations and reverted the settings.php file to 444 permissions (read, read, read). Then, all of a sudden, right after doing that, Drupal does not recognize the installation process was completed. It went back to the install screen. Worst of all. I did chmod back to 666 (write, write, write) but it does not work any more.
When I move forward as if I was going to install Drupal again, he tells me he does not have permissions to create the files folder under sites/default... But since the installation has already been completed... the files folder is already there... I am puzzled... Could it be some sort of server caching? Since this is one of my first adventures with a Linux server, I am a bit confused. Any help appreciated... Thanks.
Check your folders permissions there's settings.php...
I found the problem to be that when I changed the settings.php file permissions to 444, I also changed the sites/default folder permissions to 444. After I realized there was a problem, I changed it to 666, but it still wasn't working. The web server could not see anything inside that folder. Then finally I have set it for 755 copying other folder''s permissions... Bingo! works normally.

Resources