-2
votes
0answers
27 views

How to add an SSH user to my Ubuntu 12 server to upload PHP files

I have an Ubuntu 12 VPS and wanted to create a user account to upload and download my PHP code. So when logged in as root I created a user "chris" and then created a directory /var/www/chris I want ...
0
votes
2answers
63 views

How to let user create folder and upload file, lamp permission [closed]

I use mkdir($folder_path, 0755) in localhost(MAMP) it works, but after I move to VPS I use LAMP it failed. Folder the direction path is /var/www/html/assets/images/ the images folder info: Owner: ...
0
votes
2answers
54 views

How can I set the default permissions for files uploaded by apache2?

When I upload files through php, it writes the file with the permissions 644 (-rw-r--r--). I have my /var/www/html folder setup with setgid, so that all files uploaded are set to a group that should ...
0
votes
0answers
85 views

Why does PHP fail to open files (permission denied) under IIS with integrated Windows authentication?

I have a PHP script running under IIS for our intranet that is trying to open a file on another machine via a UNC path. I've enabled integrated Windows authentication so the $SERVER['AUTH_USER'] ...
1
vote
0answers
169 views

Centos 6.5 php can't copy file to directory [closed]

I have centos 6.5 installed on a vps. For some reason the php copy operation fails when the target is a sub-directory. I have change the folders mod to 755 and the owner is apache but no luck. Copy ...
0
votes
0answers
40 views

Sanity check: wordpress permission/ownership for multihosting

So I have a small server setup (2 webs, 1 nfs / mysql) that's hosting a couple of different wordpress sites. It's currently configured like this: I have a user called wwwuser (uid 500) and ...
0
votes
2answers
377 views

Nginx PHP-fpm permission

When i'm setting the user in nginx.conf to root root: user root root; then my website is working, but when i set it to nginx nginx i get error in the logs: connect() to ...
1
vote
2answers
283 views

Why can nginx access /etc/passwd? [closed]

I'm trying to setup my new VPS with my couple sites. nginx, php-fpm and other needed services installed. I setup a nginx server block(virtual hosts) for my site, and then try to create a php file ...
0
votes
0answers
89 views

Can't write files with PHP on IIS

I have an IIS 7.5 web server running on Windows 2008r2. When I try to write to a file I get a Permission Denied error, but I can't figure out how to fix the permissions. I have PHP configured via ...
0
votes
0answers
53 views

PHP upgrade always breaks session folder permissions

Every time I upgrade php (via yum upgrade) on my CentOS box, my /var/lib/session folder ownership becomes root:apache with 600 permissions. I use nginx as my web server. This breaks my site and ...
1
vote
1answer
194 views

allowing php/apache to delete files in an ftp directory and subfolders

Basically, I am having an issue with a php script being able to move or delete files, and I know it has to do with permissions since that's what the php error from unlink() is telling me, but I'm not ...
1
vote
3answers
102 views

nginx - linux permissions interesting issue

I'd like to get some answers or suggestions to my problem. So I'm getting a simple error: 2014/02/16 12:01:43 [error] 7384#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading ...
0
votes
1answer
169 views

How Can I Open and Print a Word Document Using a VBScript Called From the Web?

The university I work for allows students to register their bikes for indoor storage during the winter. This is done through a website. At the end of the process, a DYMO label printer connected to the ...
1
vote
0answers
37 views

Apache, php, maven and me—pemissions…

I have setup a local Apache2, with PHP and mysql. I wrote a maven build script to deploy my page on that local server. All that is working fine except for one thing: When I instruct maven to clean up ...
0
votes
1answer
161 views

With permissions 775 php error: folder is not writable

When running a script I get the following error: 'The folder "x" is not writable.' Folder's permissions are 755. Folder ownership is user:user. PHP runs as apache. When changing group ownership of ...
-1
votes
2answers
524 views

Directory and files have 775/644 permissions but php says it is not writable?

I think this has something to do with ownership of the folders, but I have a php app that I am trying to get setup and I cannot install it because it tells me the permissions are not correct. I set ...
0
votes
1answer
42 views

PHP managed to create and upload files to root of windows server

I was testing a PHP upload script which created folders and uploaded files. I forgot to make the folder path go from the root, however, the folders where still created. I checked my Windows servers ...
0
votes
1answer
159 views

How to add write permissions to php/apache? [duplicate]

I've got the following scenario: There's a folder named "uploads". It's owned by "root" and it's group is "webmasters". Permissions are set to 755. drwxrwsr-x 2 root webmasters 4096 Mar 20 22:49 ...
2
votes
1answer
717 views

wkhtmltopdf call from PHP exec results in exit code 127 failure

Using CentOS 6.3x64. I'm trying to run wkhtmltopdf (from here) from a PHP script. I can successfully call wkhtmltopdf-amd64 directly via SSH. But when calling it from PHP via exec, it always fails ...
0
votes
1answer
130 views

Domain Users group with full control cannot upload files

I'm not extremely knowledgeable about servers, so forgive my potential ignorance.. I have a server/site where users in a domain can upload .zip packages to the server. The domain is administered by ...
0
votes
1answer
157 views

FTP and Apache don't get along with ownership

I moved from managed VPS to unmanaged VPS few weeks ago and set it up as I could find guides on net. I've installed Kloxo as my webui for server management etc. I have a problem with ownership ...
0
votes
1answer
1k views

Running a batch file from PHP - interactive services detection? [closed]

I am having a very hard time getting an executable to run from within a PHP script (using exec(), or a number of other PHP commands I've tried). The issue seems to be coming down to a question of ...
1
vote
1answer
350 views

Permission error when folder permission is 755 [duplicate]

Possible Duplicate: What are the best linux permissions to use for my website? When I trying upload file with PHP to a folder that folder should have 777 permission, but this is a security ...
1
vote
4answers
2k views

How to configure PHP CLI on linux ubuntu to run as www-data?

I have a symfony2 application on my ubuntu. Symfony has a plenty of useful console commands (like php app/console cache:clear or php app/console assets:install web). The problem is If I run them as ...
0
votes
1answer
373 views

Unable to upload to tmp directory

I'm trying to test out an http image upload function in PHP. I've tried this on Apache on both OSX (locally) and Ubuntu (remotely). In php.ini I set upload_tmp_dir = /var/tmp/http-upload. Both tmp ...
2
votes
1answer
903 views

fopen: failed to open stream: Permission denied on directory with 755

I am getting the error fopen(/var/www/photos/testphoto.jpg): failed to open stream: Permission denied when PHP is attempting to write a file to /var/www/photos, whose directory permissions are ...
0
votes
1answer
9k views

How do I change the NGINX user?

I have a PHP script that creates a directory and outputs an image to the directory. This was working just fine under Apache but we recently decided to switch to NGINX to make more use of our limited ...
0
votes
1answer
388 views

File upload folder permission fastCGI - How to make it writeable?

I am using centos 5.7 with cPanel WHM running fastcgi/suEXEC I am trying to make a particular folder writable to allow a script to upload files but seem to be having problems. The folder (and all ...
3
votes
3answers
838 views

Allow PHP to write file without 777

I am setting up a simple website on webspace provided by my university. I do not have database access so I am storing all the data in a flat file. The issue I am experiencing is related to file ...
2
votes
1answer
1k views

Should I use suPHP or DSO (mod_PHP) when php scripts need to manipulate files?

I recently asked a question on StackOverflow and I'm going to re-ask it here as a different question and with some changes and additional information. I have a bunch of php scripts that need the ...
-1
votes
2answers
67 views

Folder Permissions Apache

I have a site that will need to store file uploads by the user once logged in. Currently I have a folder with permissions opened up, (777), because that was the only way I could get mkdir() to work. ...
1
vote
1answer
141 views

Apache - vhost file permissions not working properly using www-data group

I'm setting up a vhost with ftp access. I've a FTP user ftpuser, which is chrooted to its home directory, then I set up the vhost making it point to /home/ftpuser/. I've added ftpuser to www-data ...
0
votes
1answer
143 views

Trying to include file from another account: permissions denied

I have a dedicated server running php with dso handler, I am including a global config.php from one account into all the other accounts. This works fine on apache when opening the sites via browser. ...
1
vote
1answer
855 views

Change pecl's temp directory? (installation issue)

I am trying to install imagick on a VPS running Centos 5.8. Typically, it's a quick fix, but the hosting provider will not allow (permission is already denied) me to use the typical fix, which is to ...
1
vote
3answers
150 views

Granting PHP permission to send/receive requests

I've written a PHP websockets server based on this library: https://github.com/Flynsarmy/PHPWebSocket-Chat This library operates as a server, and handles all incoming requests. The client can ...
-3
votes
1answer
119 views

Protecting a chmodded 0777 cache directory?

A website I'm developing requires several directories to have their permissions set to 0777. The directories are used as cache directories for HTML and PHP files generated by the website. The ...
-1
votes
2answers
783 views

Allow apache / php user to access folder outside of web root

(centos 5.8, php 5, apache 2.3, FMS 4.5) Using Adobe Flash Media Server (FMS) recording from a webcam with a custom app works fine and the flv files are created in ...
0
votes
2answers
507 views

Using crontab to delete tmp folder files created by apache user

Currently I have it set up such that users can download zip files from my site, and they're stored in /tmp/zip_file_dir/. The PHP script first downloads them from my CDN using ftp_get() and then ...
0
votes
3answers
1k views

500 error after dragging joomla website out of subdirectory

I recently dragged a website I built with joomla out of a subdirectory and now the whole website just shows a 500 internal error, can't even log into the backend. I've already tried changing the log ...
1
vote
1answer
98 views

PHP file write permission

I have two files, one php file and one log file. The permission has been changed to the following: -rwxr-x--- 1 www-data www-data 294 2012-06-25 10:17 function.php -rwxr-x--- 1 www-data www-data ...
0
votes
0answers
85 views

Make my upload folder more secure

I'm sorry if there is already 100 answers out there about this, but they just got me confused. I've a working php-script that allows me to upload images to the webserver when I'm logged in to a CMS. ...
0
votes
3answers
242 views

Cannot properly read files on the local server

I'm running a RedHat 6.2 Amazon EC2 instance using stock Apache and IUS PHP53u+MySQL (+mbstring, +mysqli, +mcrypt), and phpMyAdmin from git. All configuration is near-vanilla, assuming the described ...
0
votes
1answer
254 views

IIS/PHP, 2 Users, same permissions, different access?

I have a hyper-v server with 3 instances running under it, testing, production, and files. The production user can access the mounted files directory with the following permissions; 'read & ...
4
votes
4answers
3k views

Running git pull from a php script

I was trying the Perfect Workflow, with Git, GitHub, and SSH, but it seems i can't run git pull. I've tried git status and it's fine. When i git pull 2>&1 i get: error: cannot open ...
0
votes
2answers
711 views

User http does not have write permissions directory?

I have a bit of an odd set up, I think. I have groups for each domain my server hosts, and I add the user http to each domain group along with the users that should have access to the groups' domains. ...
0
votes
2answers
648 views

linux crond not working

I have a cronjob which for creat thumbnails. the folder /var/www/html/work/ has permission 744(I think 744 is more safe than 777) Crontabs * * * * * /usr/bin/php /var/www/html/work/images.php php ...
1
vote
1answer
131 views

Make a file accesible by PHP but not from the outside

My host gives me two folders for my use, a /home/public/ which is where the pages go, and /home/private/, which is for my personal use. I would like for PHP to create a file that's readable by me from ...
1
vote
1answer
178 views

User permission and executing adb from php

I am trying to run adb from PHP using: exec( 'adb devices', $output, $return_val ); but I get 126 error. I think the problem is that php is running as 'www-data' user and does not have permissions ...
8
votes
3answers
546 views

My server Admin wants me to set public write permissions on a directory

I'm relatively new to web development, so please be patient. I'm primarily an iPhone developer, but have recently done a site for someone else using shared hosting. I could write to files in PHP on ...
1
vote
3answers
169 views

The secure linux server by dir permissions

I am using php on Linux / Apache server. I have Three type of directories like as |_ Writeale Directory |_ PHP Files |_ Image Files Writeable Directory would used only by PHP to writing some txt, ...