NGINX + PHP-FPM tmp dir - nginx

I need to know where the uploaded files are sent when a user upload a file like an image through php. The files are written direct to the destination directory in scripts or they uploaded to an tmp directory? In this case, would be nice if tmp directory were mounted with flags noexec and nosuid. With FPM PHP and NGINX, this is necessary? when I list the content of the directory /tmp while I upload an file, the directory is showing empty.
PS: the script is running as user that owner directory. I change the var tmp_upload_dir and when a file is uploaded, the directory still empty.

Related

Crashed site - Server unable to read .htaccess file

My website crashed when a plugin was installed ( to the wrong location) and any atttmpt to visit the web site via a browser gets the response
"Forbidden
You don't have permission to access this resource. Server unable to read htaccess file, denying access to be safe"
I was able to delete the offending plugin but this has not cured anything.
When I try to open a file to read it the response is "Something went wrong. File content can not be retrieved."
I cannot therefor edit any file.
I cannot gain access via FTP to the site
If I attempt to overwrite the main site from Staging, this process fails
If I try to restore the main site from a previously down-loaded back up zip file the process fails.
I do not appear to have a Command Line capability in Control Panel
Here are the permission codes in the root of WP
.htAccess File = 644
public_html folder = 711
.pki folder = 700
Databese folder = 755
public_html folder =755
mysqldumps folder = 755
staging folder = 755
As administrator, I can access the WP control panel and can open up the directories and sub-directories.
Any assistance would be appreciated

Sublime text SFTP plugin. How to set automatic selection of a remote directory?

How can I set up automatic selection of a remote directory based on the location of a local file?
Settings: "remote_path" "/site.ua/www/"
For example: the abs.php file is located on the local server along the path: /www/php/abs.php, and this plugin uploads all files to the root directory on the remote server /site.ua/www/abs.php
I need the files to be loaded into the appropriate directories.
UPD: at the same time, the js- and css-files are automatically allocated to the remote directory according to their location on the local server.

Get folders with files from ftp with spaces in their names

I am trying to get files from an ftp location. The files are present inside folders in the ftp location and the folder. My folder names contain spaces. For example My folder structure is as below in ftp location:
MYFOLDER/Inner folders/inner files***.pdf
MYFOLDER/Second Inner folders/inner files***.pdf
My aim is to get all the folders with their files to my local.
I tried mget -r * but unable to get the files and got the error "Failed to open file.". Can anyone help me with this.

Read file from a directory outside of Web project

my web application project (JBoss AS) needs to read a file which resides outside of this project. For example, the file to be read is under /tmp/.
It looks like classes in the project can't access files under /tmp/. However, it can output to a file in /tmp/.
Is this normal? How to access /tmp/ directory in a Web application?
Use java.io.tmpdir system property.
File tmpDir = new File(System.getProperty("java.io.tmpdir"));
//Use tmpDir to access files in tmp directory
Make sure there are unix permissions to read/write contents on tmp directory.

where to put wordpress htaccess on openshift

I have cloned my wordpress application from openshift with git, in my cloned application there is php folder, when i put my htaccess file in it then i commit my changes like this :
git add -A
git commit -m 'ok'
git push
My htaccess file is not pushed in the application repository folder on openshift, but when i put it via ftp with filezilla it works, not with git.
I don't know where i have to put .htaccess file ? if it is in php folder, why it's not uploaded ?
If you used our official quickstart, you would need to use an action_hook (probably deploy) to copy a .htaccess file into place, otherwise the files are actually not stored in a place that is affected by git. You could also try using this quickstart( https://github.com/openshift-quickstart/openshift-wordpress-developer-quickstart) where EVERYTHING except for uploads, is stored in git (plugins, themes, etc)

Resources