System() Or Exec() And Permissions
I'm trying to run a command (mogrify) that requires that I'm logged in as root, or at least I think this is the case. How can I do this?
View Complete Forum Thread with Replies
Related Forum Messages:
- Filehandling And System() Permissions.
- PHP System() And Exec()
- System() And Exec()
- Exec(), System()
- Content Management System With Robust User Permissions
- Bug In System And Exec Commands
- Exec() And System() Problems
- Using Passthru(), Exec(), System() Etc.
- System/shell/exec/etc
- Exec(), System() And Win 2003
- Use Exec() In PHP 5.2 On A Windows XP Pro System
- Problem Using System/exec Function.
- Using System/exec, How To Backup Database?
- Exec(), System(), Shell_exec(), Etc + Nmap
- System/exec Not Working In Browser
- Command Window - Exec/system
- Exec, Shell_exec, System, And Passthru Not Working At All
- Exec And System Commands Blocked By Host
- Alternates To System() And Exec() In Order To Use ImageMagik?
- Exec - Create An Executable That Return The System Drives
- Running An .exe File Using Exec() Or System(), Unable To Fork Error
- System(), Exec(), Shell_exec(), But "Permission Denied"
- Warning: Ftp_exec() [function.ftp-exec]: SITE EXEC Is An Unknown Extension
- Warning: Exec() [function.exec]:
- System(); Command Not Working On Remote System. Windows.
- Make A News System With A Template System
- Login System - News System
- Permissions - 644
- XML With PHP Permissions
- PHP And IIS Permissions
- Permissions
- PHP Permissions
- Permissions?
- No Permissions
- 755 Permissions
- Permissions With Fopen
- Write Permissions
- PHP Permissions Dilemma
- Zen Cart Permissions
- Symlink And Permissions
- PHP & NTFS Permissions
- Uploads And Permissions
- Permissions Oddities
- Permissions Problem
- User Permissions
- File Permissions
- Permissions And Fwrite()
- PHP Permissions In Windows XP
- Security And Permissions
- Unix Permissions
- Folder Permissions
- Unlink Permissions
Filehandling And System() Permissions.
I am creating an Apache admin tool for some less "linux-able" users at my job. My tool needs to be able to 'restart' apache on 3 different servers being that it is a cluster. I have a shell script that I write that uses 'ssh' to accomplish this but only if I am root or in the sudoers file. How would I allow the user via my web tool enough privileges to restart apache? Code:
View Replies !
PHP System() And Exec()
Background: I am trying to execute a binary on the server located in the current directory where the php script is being run. The server is a linux (debian based). I am having trouble getting php to execute the binary properly, below is my code. Code:
View Replies !
System() And Exec()
If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends. I have tried numerous time by redirecting to a file or other stream to free up a php web page that called a perl script for example, but the php script always hangs...has anyone had any luck freeing up a calling php script from a process, or program that it launched in the background? Code:
View Replies !
Exec(), System()
I write very, very simple script who call external program. The script is run on Linux Slackware, Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.8b PHP/4.4.4 here is my script: <?php echo exec('ls'); ?> this work properly. but if i write: <?php echo exec('xine'); //xine is a multimedia player ?>
View Replies !
Content Management System With Robust User Permissions
I've been searching for hours for a CMS which has a lot of options for user permissions. It has to be free and while mySQL is fine, it can't require root permission to install. Specifically, I want to be able to create news annoucements and links to files, images, etc that only users of a certain group can access. Basically, this is going to be the internal section of my company's website where clients will login to get news pertaining to them, get their latest invoice, etc. Eventually they want me to incorporate SolarWinds stats into it - whatever that is.
View Replies !
Bug In System And Exec Commands
If PHP is running via a web server, and mutiple system calls are made within the script to another script, hundreds of processes are created. Here is an example: Script 1: <?php for ($i=1; $i<=5; $i++) { system("php script2.php"); } ?> Script 2: <?php exit; ?> The effect is the same (and more difficult to stop) when the system calls are made in the background. e.g. system("php script2.php >>/dev/null 2>>/dev/null &"); system("php script2.php >/dev/null 2>&1"); I have even tried calling a shell script, which in turn calls the second PHP script (both in the background), but it still causes lots of processes. The "exec" command is also affected. At first, I thought this was a problem with either Zeus web server of Fast CGI, but I have since tried it with Apache and normal CGI with the same effect. Does anyone have any idea why this happens and whether there is any way to prevent it? I have posted a bug report to bugs.php.net (ID 14997), but so far to no avail.
View Replies !
Exec() And System() Problems
I am trying to use php's exec() or system() to execute a shell script that I wrote. exec and system() work fine with a simple command like ls, but nothing happens when I point it at the shell script. The shell script works fine from my shell login. Can't figure out what tho problem is. Is php just incapable of running shell scripts?
View Replies !
System/shell/exec/etc
I've got PHP 5.1.6, Apache 2.2.2, on Fedora 5. Everything is great except that when I use an of the external launching commands, persistent apps dont stay open. I have a simple shell script set up to load an app, and I have it write a PID file. Immediately after calling exec (milliseconds later) the PID is alive. However, within a few more milliseconds it seems to close. I've made sure that the apache uid/gid have full access to the script and the apps it calls. When sudo'ing manualy in a shell with the apache uid, the script works flawlessly and loads the program, and stays open, as it should. I've verified that the app loads under the uid 'apache' with ps. When running it through PHP, it seems to close almost immediately after succeeding. Is there some fundamental issue with how this works that I'm missing? I can't seem to get any real errors out of php, apache, or even the shell when redirected to a file. Should I try PHP4? Is PHP5 buggy with this kind of thing? I even tried running 'at' to schedule the script (so that it'd be invoked by at instead of the shell itself) but that failed, silently, as well.
View Replies !
Exec(), System() And Win 2003
I have searched high and low for the past 2 days for an answer to my problem. I have found a few references, but nothing has helped me. My problem is this: I am trying to ping a remote server from a PHP script in IE 6.0. When I load the page, the cmd.exe loads on the server and takes up all my CPU. I have to manually stop the process for it to go away. My setup is this: Windows 2003 Server PHP 5.0.1 I have tried - giving my system32cmd.exe full IUSR_%machinename% rights - moved the cmd.exe to the script folder, to the PHP folder And about a million other things that I can't remember =(. I have tried multiple functions, written in mulitple ways and the outcome is always the same. when the cmd.exe is opened it hangs on the 2003 server.
View Replies !
Use Exec() In PHP 5.2 On A Windows XP Pro System
I'm trying to use exec() in PHP 5.2 on a Windows XP Pro system. What I'm trying to do is use it to tell an already running program what to. For example: X:pathprogram.exe /something or X:pathprogram.exe /something_else If I do the command through the command line, it works, but so far I have been unsuccessful in PHP. Usually it PHP just hangs, and give no error message, and does nothing to the program.
View Replies !
Problem Using System/exec Function.
I am faced with strange problem. Basically I want to make a script which would take mysql back up for me. I have come up with following. [ basically code is borrowed from some other place ] PHP Code:
View Replies !
Using System/exec, How To Backup Database?
system("mysqldump --opt myDatabase > backup.sql"); here are my problems, i don't think it works on the webserver. next, where exactly the file, backup.sql be place if it does succeed. i believe we just can't execute commands on the webserver can we? i also tried using the sql query BACKUP TABLE ... TO .. but i'm guessing the problem lies with the TO... how do i know what directory shall i place it therE? for instance, my pages are placed in, home/myname/public_html/... i tried to put home/myname/public_html/backup in the TO but nothing happens.
View Replies !
Exec(), System(), Shell_exec(), Etc + Nmap
i'm trying to create a script that executes nmap from my server, then displays the output. i've tried: $output = passthru('nmap -v -A'.' $ip'); $output = shell_exec('nmap -v -A'.' $ip'); system('nmap -v -A'.' $ip'); the problem i'm having is that using the above methods i only get the first line of output, ie. Starting Nmap 4.20 ( http://insecure.org ) at 2007-08-31 21:46 CST and nothing else. i've managed to find a way around it by sending the nmap output to a textfile, the using file_get_contents() to pull the data back in: exec('nmap -v -A '.$ip.' > /usr/local/www/apache22/data/nmap/'.$ip.'.html'); $file = "/usr/local/www/apache22/data/nmap/$ip.html"; $result = file_get_contents($file); echo "(pre)$result(/pre)"; that works perfectly, but i'd rather not be writing anything to the drive. i guess the problem might be that nmap takes about 5-10 seconds to do its scan, and for some reason php doesn't want to wait that long, i really have no idea. can it be made to work without needing to write to files? and for the curious minds, i'm not doing anything dodgy, i just wanted an online tool i could access from any computer to test networks i support .
View Replies !
System/exec Not Working In Browser
In two files, and I serve foo.php then I notice If I use commandline execution i.e. php foo.php then foo.txt is touched/created all right. i.e. system command is executed as expectedBut If I use browser then I notice that the shell command in config.php is *not* executedAny ideas as to why this might be happening? Code:
View Replies !
Command Window - Exec/system
I'm in the process of developing a script in Windows where I need to use exec/system. Whenever I execute either, Windows spawns a command window which automatically sappears. Is there a clean way to force Windows to NOT display the command window? I've seen this discussed a few times previously, but, none of the solutions seem to be working (tried both exec and system; tried using cmd /c, tried using start /B, etc.)
View Replies !
Exec, Shell_exec, System, And Passthru Not Working At All
Can't get these commands to work! The following page simply doesn't finish loading ( Waiting... Opening... :-( ) <?php echo system("dir"); ?> The same for <?php echo exec("dir"); ?> or <?php echo shell_exec("dir"); ?>, etc... I'm running Apache 2.0.55 & PHP 5.0.5 with Zend Optimizer v2.5.10 on windows XP SP2.
View Replies !
Exec And System Commands Blocked By Host
I've got this code, its the simpliest example I could make. It works perfectly on my windows xp/apache/php box, but doesn't do anything on a commercial website host. The actual code should use gzip to compress a folder but that doesn't work either. Anyone know the reason why they would be blocking these commands? I suspect the problems with commonly used php apps like phpBB to be the real reason. <? exec("ping 127.0.0.1 > test.txt") or die(); // get contents of a file into a string $filename = "test.txt"; $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize ($filename)); fclose ($fd); echo $contents; ?>
View Replies !
Alternates To System() And Exec() In Order To Use ImageMagik?
My Web host apepars to not allow exec() and system(), as a line in my script: system("convert -scale 100x100 $uploadfile $toimage"); gives the error: "Warning: system() has been disabled for security reasons" Is there some other way to use ImageMagik (or is it GhostScript?)'s "convert" command in PHP that may be safer and generally allowed by Web hosts?
View Replies !
Running An .exe File Using Exec() Or System(), Unable To Fork Error
I have a problem with running an .exe file using exec() or system() I have downloaded a file called ffmpeg.exe for converting movie clips. I can use the program thourg the command line in windows (cmd), but I'm not able to have PHP run the file. First PHP gave be an "unable to fork" error. But then I gave users access to the cmd.exe file and solved that problem. So now is no problem running for example exec("dir");
View Replies !
Warning: Ftp_exec() [function.ftp-exec]: SITE EXEC Is An Unknown Extension
This is kind of a part II to a question a posted earlier about exec and shell_exec not working. I'm trying to use ftp_exec to execute some simple command: $conn_id = ftp_connect("$server") or die ("Cannot initiate connection to host"); ftp_login($conn_id, "$username", "$userpass") or die("Cannot login"); $command = 'cd..' if (ftp_exec($conn_id, $command)) { echo "$command executed successfully"; } else { echo "could not execute $command"; } ftp_close($conn_id); I'm getting the following error: Warning: ftp_exec() [function.ftp-exec]: SITE EXEC is an unknown extension in /home/urieilam/public_html/work/video/test1.1.php on line 21 could not execute cd.. Have tried other commands as well, get the same. Could this be a security issue or something to do with p Safe Mode? I don't know much about commands, shell, etc..
View Replies !
Warning: Exec() [function.exec]:
I'm using PHP Version 5.0.4 in IIS5, Window 2003. When I execute my script, it prompt me the following error : Warning: exec() [function.exec]: Unable to fork [ping 10.8.1.70] in c:Inetpubwwwrootswitch.php on line 62 Below is my script : <?php $line1 = exec("ping 10.8.1.70", $output); exit; ?>
View Replies !
System(); Command Not Working On Remote System. Windows.
My server is a windows machine, on the same domain as python(also a windows machine). Apache is running as a service as an administrator. This is a test only environment to whom it may concern(I hate people telling me how insecure my system is) I'm just trying to run: $last_line = exec('dir pythonc$', $retval, $g); print_r($retval); echo '<br>'.$g.'<br>'; echo '$last_line= '.$last_line.'<br>'; Which outputs: Array ( ) 1 $last_line= The command from the command line works fine. And apache can access directories that only administrators can access on the local machine.
View Replies !
Login System - News System
i have to do a news system wich use php/mysql. i need 3 accounts: * a 'reader' who doesn't need to log in to read the news * a 'writer' who can write news in a pending news table * a 'moderator' which validate a pending news, and make it a regular news, viewable from the site (by the 'reader') This is a small web site, so i can't use SSL; and i use php sessions. Right now, i deal with account from a mysql users point of view, which means, that a 'reader' can access all the admin part of the site, but will ger errors when trying to read/write by sql query. I was wondering if somedody could give me a trick to deny access to the admin pages. Rigth now, i though about these: * by decoding mydql rights? (how) * by doing only-to-test query? (bad i think, especially for write right)
View Replies !
Permissions - 644
I had a nice php application running on my server here at home, and I uploaded it to a shared public type server and it started to break all over the place. It turns out that some scripts required higher permissions that others, but I can't figure out what the difference is. They all read from the database. Some write to the database, but not all the ones that require higher permissions do. I don't understand what it is about some scripts that require execute permissions while other do not. And I don't really understand who at the server is the owner and who is the group and who is the world. And last why did all these scripts work with 644 on my server here even for people accessing it from outside the LAN and what's different about the server farm?
View Replies !
XML With PHP Permissions
I am playing around with the idea of writing a xml based cms, and would like it to be able to be used on hostings where you do not have the ability to password protect directories. Would a simple permissions check at the top of the file be enough to enure it is not read? <? if( ! authentication check){exit();} ?> If I then call all my xml files say abc.xml.php they would not be able to be viewed externally. Say I then read in the files, and replaced the authentication with empty '' Is that likely to work? If so should I put the <? xml version="1.0"> before or after?
View Replies !
PHP And IIS Permissions
It's been a long time since I've asked any techie questions on Usenet but I am under pressure to finish a project and the following issue has me stumped. I appreciate that it's a bit long-winded but I'd be much obliged if anyone could shed any light... I am currently developing a PHP-based site for a client on IIS. It might be worth pointing out here that, from a Linux background, I am no expert on IIS or NTFS permissions. The site includes an /admin/ folder that I wish to secure with a password. The contents of this folder includes non-web files that I wish to protect, so application-level password protection implemented in PHP is not suitable. To secure the folder at the IIS/NTFS level, I enabled a "WWW Password" in a web control panel (HCPanel) for the admin folder. Am I right in thinking that this would probably create an IUSR account on the server, and modify the admin folder's ACL to restrict access to this account only? Anyway, this works great for static content and some PHP files, but I have come across the following issue... When a PHP file in the protected area (e.g. /admin/index.php) tries to include() or require() a PHP file outside that protected area (e.g. /include/config.php), an error occurs: Warning: main(../include/config.php) [function.main]: failed to create stream: No such file or directory in c:websitesclientusernameclientdomain.comadmin index.php on line 3 Fatal error: main() [function.main]: Failed opening required '../include/config.php' (include_path='.;c:php4pear') in c:websitesclientusernameclientdomain.comadmin index.php on line 3 This occurs only when the admin area is protected; removing the protection allows the script to run normally. Changing '../include/config.php' to an absolute path changes the first error to a "Permission Denied" warning. To me, it's logical that /include/config.php might not be able to include /admin/index.php as it does not have permissions, but why does the 'priviledged' user /admin/index.php not have access to /include/config.php? I recognise that there are ways to work around this e.g. creating a copy of the included files under the admin folder, or resorting to application-level password protection, but I'd hope that there is a more elegant resolution.
View Replies !
Permissions
I have created a system (replication of old project), that I am using as the base of something that needs to be done for a client. There are projects, and there are clients. Some clients have permissions to whatever projects they have permissions to, and can't use the one's they don't have permission to. I created a table for permissions, which takes the project id and name, the clients id and name. It inserts them into a "permissions table". I had an idea, and when I sought to implement it, it did not work. I have 2 areas to change permissions. If you are a client, you have an area called project permissions. The idea is to pull the name's, of ALL the projects, and show there names on the screen with check boxes beside them. If they are allowed to use that project, it's checked, if not it's unchecked. They can alter the check boxes as needed, then they submit, and it does all the necessary "alterations" to the permissions table. If you are in the project view, you have an area called "Client Permissions". The idea is the pull the name's, of ALL the clients, and show there names on the screen with check boxes beside them. If they are allowed to view that project they are checked, if not they are unchecked. They can alter the check boxes as needed, then they submit and it does all the necessary "alterations" to the permissions table. When I first created the idea behind the check boxes, I thought about it and presented the idea, and rough sketches to the client. He was happy about the idea, and wanted me to implement it. I went ahead and sat down to do it, and my mind when blank, I really have no idea "how" to implement the idea. I went ahead and started with the projects. I have a link that says "Client Permissions". They click on that and are taken to clientpermissions.php which is the page that holds the script for showing the check box list of names of clients. However, I ran into a problem. If I go ahead and pull all the data from the "clients" table, and show there names on the screen, each one with a check box beside it, that check box name will be the id number of the client to be able to identify which client it is. Then the value is either allowed or disallowed. The problem now comes that I can't figure out how to check the permissions table with EACH client name, to see if they have a permission record for that project. I will run into the same problem when I try to update all of the client lists. I could look through it, the one's that are enabled automatically get a database record for permissions, with the information. However the issue is when the system get's the results. I have a list of those who they want enabled, and the one's they want disabled. I have to somehow figure out how to set it up. I am thinking for that I could delete all project permissions related to that one project, then just re-enter the ones that are enabled, ignoring the ones that are disabled. That will give the permissions for that project reset each time. That part I can come to a solution for. In the end I have a current problem. As I mentioned above, I can get the names of the clients out on the screen with check boxes. I can also make the name the id number, and the value either allowed, or disallowed. That is fine, and I can definitely work that out. What can I do to check the client to see if they are enabled or disabled. I am afraid of resources for one reason. For instance. I could have 1. hit the clients table and get all the data 2. Display all there names with check boxes. 3. For each check box hit the permissions table to see if there is a record, if there is mark the x, if there isn't don't. Sounds pretty simple to me, but then I am worried about it making that many database calls. If there are (for example), 50 clients. When they load that page it's going to make a total of 51 calls on that one page (1 call to the clients table, 50 calls to the permissions table). This same issue is going to be encountered when I begin to deal with the clients, and try to allow them project permissions from that console. I will be able to solve that problem however I solve this one, but I need some advice on solving this one. Any advice is greatly appreciated?
View Replies !
PHP Permissions
I was wondering what php permissions is all about? Been trying to get my security more tight but don't know how or where to begin i was told about permissions but I don't really understand them... =/
View Replies !
Permissions?
I have the following problem: I want to grant different access rights to different users on a page, identified by username/password. I want to load the set of users/passwords from a database, from a file, or whereever. This is more or less OK: outside users connecting via the web can sent their username/password ($_POST variable), the script checks it agains the users/passwords in the database, and grants different access rights according to the username. Code:
View Replies !
No Permissions
I can't seem to get the permissions for mysql to work in phpMySQL. They used to but a change in the system happened and they stopped working. Where do I lok to reset the permissions?
View Replies !
755 Permissions
I need to use unlink,fopen functions. The problem is that these functions needs to be executed in subdirectories, which have 755 permissions (writable just for a user). I could change the perms manually, but I don't wanna do that - thare are too many of them. I figured that I could execute that script as a user. Since php is running as "nobody" I also changed the script's owner to nobody- but didn't really changed anything.
View Replies !
Permissions With Fopen
alright I have a problem with fopen. I have a script in a .htaccess protected directory. Now I am trying to make this script rewrite a file in the server root directory that is a public file. Now for some reason I keep getting permission denied when the script runs. the password of the directory where the the script resides is the same as owner/pass. Is there something I need to add to fopen such as user/pass info? any help appreciated
View Replies !
Write Permissions
if i ftp to a site and teh structure is this: top folder - no write permission subfolder of top - allow write sub sub folder of top allow write shouldn't i be allowed to write to database if my database is in the sub sub folder?
View Replies !
PHP Permissions Dilemma
I'm developing an open source CMS, but have come across a problem. The system dynamically creates .php files for the front-end of the site, meaning they're owned by user 'nobody'. However, for anyone with safe mode turned on, any "require_once" or "include_once" commands used in these php pages won't work due to safe mode restrictions (the script whose uid is * is not allowed to access..). I want to this system to be available to users without access to the chown command (many hosts block it), and with safe mode on, so any suggestions? I'm developing an open source CMS, but have come across a problem. The system dynamically creates .php files for the front-end of the site, meaning they're owned by user 'nobody'. However, for anyone with safe mode turned on, any "require_once" or "include_once" commands used in these php pages won't work due to safe mode restrictions (the script whose uid is * is not allowed to access..). I want to this system to be available to users without access to the chown command (many hosts block it), and with safe mode on, so any suggestions?
View Replies !
Zen Cart Permissions
Does anybody know why when I create a folder under the zencart directories, and I change permissions, to let's say 777, they automatically get reset to a permission like 644.
View Replies !
Symlink And Permissions
I have a problem using symlink. When I try to create a link to a file inside a directory created using PHP I get this error: Warning: symlink() [function.symlink]: SAFE MODE Restriction in effect. The script whose uid is 1425 is not allowed to access /hosting/user/public_html/home/r23 owned by uid 100 in /hosting/user/public_html/siteupload.php on line 88 I know it something about permissions, but can't I create a link to a file that is not owned by httpd user?
View Replies !
PHP & NTFS Permissions
I'm having a problem and I hope some of you may be able to point me in the right direction. I inherited a web site using php, running on Windows 2000 & IIS. The site was developed by a consulting firm about a year before I came on board, the consultant has since gone out of business. Overall, I've never had a problem with the site and have been able to figure out nearly everything they configured on it. The server with the site is getting old, so I'm trying to migrate it to a new box. I've configured the new box to be identical to the old one - in terms of partition layout, directory structure, NTFS users / groups & NTFS permissions, php.ini, etc. I have php installed with IIS & it is working properly. All aspects of the site work, except for one. We have a feature that allows users to log in to a file manager & edit existing pages. When I try to edit one of thes pages, I get an fopen error, complaining that permission is denied. To reach this file manager, the users log in twice. They first log in using a web-based form, which pulls their user details from MySQL. To reach the file manager itself, they have to enter a username / password using basic IIS authentication (the pop-up box). The username / password they use to access the file manager is a local account on the web server. The user they are logging in as has full NTFS permission on the web root. When they attempt to edit a file, the php script is supposed to create a temp "lock" file in the current directory. When the script attempt to create this temp file, the "permission denied" error is generated. If I set the Everyone group to have write permission on the web root, the problem goes away. Obviously, I don't want to do this. This was not needed on the old server. My question, seeing as my users / permissions / etc on the new machine match what I have on the old machine, why would I be having this "permission denied" error. What user would php try to create the file as?? The files, as well as the directories, in question here have the proper permissions set - at least they match what I have on the old server. Doing a phpinfo(); on the old server & new server shows identical values for temp files, etc etc.
View Replies !
Uploads And Permissions
I set up a php script to upload files into my incoming directory. It works, but there's one thing puzzling me. I don't want it to be possible for mischief-makers to upload more and more files and max out the disk quota on my account. So I thought I would just have the script look at the sum of the file sizes already in the directory, and refuse the upload if there is already too much stuff there. The problem is that the incoming directory is write-only, so the script can't look at the sizes. I could use a different directory that's read-write, but they say you shouldn't have such a thing for security reasons. More generally, I'm unclear on the concept of how to allow PHP scripts to do things that anonymous users can't. The web server is running FreeBSD, and is at a hosting company, so I don't have root access to it.
View Replies !
Permissions Oddities
I'm developing a system that needs to read and write files in a subfolder. Fread(), fwrite() and move_uploaded_file() are the commands most commonly used. My problem is that files will only be accessed if I chmod the subfolder to 777. No safer level of security works, unless I chown folder and set its ownership to nobody (the Apache user). I'm developing the system for people to use without access to a shell, and they may have Apache running with a user other than 'nobody'. Is it safe to leave the folder with 777 (it contains PHP scripts), or is there another solution?
View Replies !
Permissions Problem
im running php5 on a suse linux box. Im writing a file upload script. Currently i can pull the temporary filename out of the post data but i cant seem to open that for reading. Its stored in /tmp. Can anyone think of a reason why i can upload stuff but not read it once its there?
View Replies !
User Permissions
I would like the users to login and be assigned a guess pass as a general permission where they can view the contents of the databse information based on the form they visit. That's no problem, but how do their permissions get upgraded to -Level2-being able to add to the database and view the contents? Then -Level3- hasving complete control add/view/update/delete records from the database? At what point does the upgrade happen, and what do you base the upgrade on?
View Replies !
File Permissions
Im in the process of creating a web based frontend for a program called ASK (Active Spam Killer - http://a-s-k.sourceforge.net) and am currently running into a problem. Currently there is a perl based web front end, but it lacks functionality, and is rather bland, although it does work, and it works without changing any file permissions. The problem im running into is that PHP requires me to make changes to file permissions (ASK files are located OUTSIDE of the web tree) which might end up causing problems as far as security and privacy of email. Has anyone come to any reasonable answer for this type of problem as im sure its a issue for other programs people write.
View Replies !
Permissions And Fwrite()
At my old hosting I could freely use the open and write to files using fopen() and fwrite(), files created would be under the ownership of my username. At my new hosting it's a little different, if I upload a file it'll be assigned to the ownership of my username, but if I create a file it will be under the ownership of 'nobody'. I get a permission denied error when I try to write to any file that is owned by my username. This creates a problem as I can't edit any files created by nobody without changing the ownership. Last week all the files in my public_html directory changed ownership to my username, even if the owner was 'nobody'. This is a strange problem, it occured again today and the only solution I can find is to delete the files and let them be created again under the owner 'nobody'. Because I am not the superuser I cannot change file ownership, why hey changed in the first place I am not sure, the support from my new hosting has been almost non existent, they claim the problem lies in my scripts. Even the error_log files have been changed to my username from 'nobody', so they haven't been updated since December 20. Is there any way of authenticating a script to be able to modify files under my username? I have suppressed the errors by putting an '@' in front of the file commands, is there any way of outputing a less obvious custom error?
View Replies !
PHP Permissions In Windows XP
I'm running Apache as "localhost" for testing purposes on Windows XP. I need to set the permissions for a folder so that a PHP script can write subfolders and files to it. So far, I've right-clicked the folder, clicked "Properties...", clicked the "Security" tab, but then I'm lost. In Windows 2000, I could set an "InternetUser" group with the appropriate permissions. I can't figure out how to accomplish the same with XP.
View Replies !
Security And Permissions
I'm just wondering about the best way to setup permissions on a website with a php editor which modifies the html files for the user depending on the input from forms. It seems that the .html pages need to be set with chmod 777 in order for the php scripts to successfully write back to the server. This doesn't really seem very secure to me and I'm sure there is a more secure way to set this up. At the moment the root context is owned by httpd and the files are owned by the user/site owner although a few files lying around are owned by admin.
View Replies !
Unix Permissions
I have a folder which I store php generated images in. The app only seems to function when I have the rights set to 0777, but I don't understand why I need "execute" to read/write a PNG file. What am I missing?
View Replies !
Folder Permissions
My trouble might be simple, but I'm quite new to php, and, perhaps I'm even more simple. It's that I had to chmod 777 two folders to get my scripts do what I wanted them to do, and I don't like it. I have a script running on my ISP's unix-apache -server. It is to read string from a form, and create a text-file in a subfolder 'txt' from it. The essential parts of the script is here: $fnam=$HTTP_POST_VARS[filename]; $handle =fopen("txt/".$fnam, "w"); $teksti=$HTTP_POST_VARS[tekstikentta]; touch('txt/'.$fnam); fwrite($handle,$teksti); fclose($handle); Can't be simpler. This script didn't work until I did a chmod777 for both folders, the one where this script is, and the 't' subfolder. Is there a way to get around this?
View Replies !
Unlink Permissions
I was just wondering how to assign the appropreate permissions so files can be removed using unlink in MS Vista. I have set the folder to allow full access to all users but this does not seem to be enough.
View Replies !
|