473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

CHMOD, CHOWN, run script as a different user...

Hi !

The entire (PHP-) world seems to have the same problem:
Many providers let you upload as one user, lets say "ftpuser", yet then
apache and your script will run as another user e.g. "nobody"

Allways the same trouble:
You would need to chmod your entire website by ftp-client/telnet, to have
things like a php-based file-editor work...

There IS a chmod as well as a chown in PHP though. Sadly you can't use it,
because (har,har) you don't have the rights. Even if your were equipping
your script with your FTP login and pass, I can't see a way to make use of
it.
So question in short:
Is there any way in PHP to execute a script as another user,
roughly like ftpuser:mypass@my_recursive_chmod.php

or is there a way to take ownership of "another users" files,
as long as you have the credentials ?!?

how do you call shell scripts in PHP anyway?
Is there perhaps a way, to then employ a regular shellscript as in
"take ownership, baby, here are the credentials..."
A million thanks, folks !!!

Frank

Jul 17 '05 #1
0 7146

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: stijn goris | last post by:
hi all, I have a file (mode 644) I want to change to mode 777. The code: if (file_exists($this->mailAliasFile)) { echo "file exists<br>"; if (chmod ($this->mailAliasFile, 0777)) echo...
0
by: Bob Bedford | last post by:
I've to allow an particular user to access a particular directory, but I've no access to the server. The administrator said I've to create a dir by a php script (I know) and give full access to the...
6
by: Ask Josephsen | last post by:
Hi NG If I write the following: <?php $file="myfile.JPG"; if ( getmyuid()==fileowner ( $file ) ) { chgrp ( $file, getmygid() ); chown ( $file, getmyuid() );
2
by: Joseph S. | last post by:
Hi all, Consider this case: I have a free php hosting account (a LAMP host) with an account name (also the name of my directory) 'sample'. Under 'sample', I have php scripts which can create...
47
by: frizzle | last post by:
Hi, I am at the base of an FTP thingy i'm building, and i noticed that it would only work if i chmod the folder 777, i thought to remember correctly that previously on another site chmod 744 was...
3
by: Rik | last post by:
Hello, first of all, my provider sucks, newsserver is down for the #nth time now, offcourse when I have an urgent question.... So this will be me first time using Google Groups, forgive me if...
2
by: Fabian Steiner | last post by:
Hello! As far as I can see os.chmod() doesn't adjust permissions on directories recusively. Is there any other possibility to achieve this aim except for calling os.system('chmod -R /dir')...
1
by: lawrence k | last post by:
I've a simple script to transfer some files from one domain to another, with both domains living on the same server. The files in both directories are already chmod 777. Yet after transfer, I try...
2
by: fouadk | last post by:
hi everyone i have created a directory using the mkdir() in a php script... i have created that directory in /home/username this folder is owned by the group and user www-data i am trying to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.