473,766 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

changing permissions

\
Problem is something like this. Some web applications written in php
change permissions of some files and directories so I can't remove them
if I don't change permissions to write those files and dir's. I can do
that by making a php file with code :

<?php
chmod ("dir-or-file", 0777);
?>

and send it to server and point browser to that file.After that I can
remove the file or directory but the problem is: sometimes there are
ten's maybe hundred's of files to change and remove.It take's a lifetime
to change permissions one by one so what is the code to change
permissions recursively to all subdirectories and files.

I hope my english is understandable :)

Mika Suomi
mika(a)villafin n.net
Nov 22 '05 #1
2 1443
On Sun, 20 Nov 2005 08:21:28 GMT, \"@ <""mika(\"@)vil lafinn.net">
wrote:
Problem is something like this. Some web applications written in php
change permissions of some files and directories so I can't remove them
if I don't change permissions to write those files and dir's. I can do
that by making a php file with code :

<?php
chmod ("dir-or-file", 0777);
?>

and send it to server and point browser to that file.After that I can
remove the file or directory but the problem is: sometimes there are
ten's maybe hundred's of files to change and remove.It take's a lifetime
to change permissions one by one so what is the code to change
permissions recursively to all subdirectories and files.


not sure if it will work via PHP - but you can recursively chmod from
a *nix shell using the -R switch...

e.g. chmod -R 777 dir-or-file

not sure - perhaps a similar thing can be done?

--
John McClumpha
Darkness Reigns - http://www.incitegraphics.com.au/darkness/
Nov 22 '05 #2
\
> not sure if it will work via PHP - but you can recursively chmod from
a *nix shell using the -R switch...

e.g. chmod -R 777 dir-or-file

not sure - perhaps a similar thing can be done?

--
John McClumpha
Darkness Reigns - http://www.incitegraphics.com.au/darkness/

That can't be done by me because I don't have rights to do that, but
when it's done by server when I'm pointing browser to php file it works.
And I have tried to use -R option with php but maybe I didn't write the
code right... I don't know

Mika Suomi
mika(a)villafin n.net
Nov 22 '05 #3

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

Similar topics

7
9751
by: LRW | last post by:
Sorry to crosspost, but I have no idea if this is more a PHP question of general Linux question. I have a script that makes changes to image files, montages them into a jpg, and creates a Web page with that image. It starts with someone from our graphics dept. who I set up to copy the image files over to the Linux server with SAMBA. The files gain the owner/group of "nobody" and permissions of 744.
0
1323
by: Gary L. Drescher | last post by:
Quick user question. I changed an XP Pro user account from Administrator to Limited, and then found I cannot not sign in to .NET 1.1 (via MSN Messenger 6.1 or via Money 2003, for example) from that account. I get an incorrect-password error no matter what (correct) user/password combination I provide. But I can sign in via other XP accounts (both Administrator and Limited). And when I change the account in question back to Administrator...
2
380
by: Ryan McCormack | last post by:
I have a setup project to deploy our software -- but I have a problem. I want the installation to be system wide, but I also want all users to have rwx permissions to the installation directory (c:\program files\company\program\) The reason is as follows: I have an autoupdate feature that grabs new updates when they are available -- but in many cases a regular user is at the machine and cannot update the software because they do not...
1
3115
by: trt08010 | last post by:
I'm new to MySQL so hopefully this all makes sense. I'm running mysql-3.23.58-14 on Fedora Core 3 and everything installs and comes up correctly using default locations for everything. However, I installed an 800GB RAID5 array in the server and created a new file system on it and I attempted to move the datadir location to the new file system and that's when the problems started. Basically what I did was this - I shut down mysqld and...
2
1558
by: Tim Chmielewski | last post by:
I have a an Access 2000 database that I have given read & write permissions to the IUSR & IWAM users on my machine (for a web application), but every time I open the database directly, it loses the permissions for those users. Anyone know how this happens? Thanks. --
2
4355
by: Jozef | last post by:
Hello, Is there a way to change table permissions in VB Code? I can't seem to find much that's concise in the help file. Here's the situation; I have a table in the "data" portion of a split database. The table is a list of values that shouldn't be accidentally changed by the user, so I've taken the administer and delete permissions off. I'm using the regular workgroup file, with the default Admin user name, so there is no funky...
1
3070
by: Daniel Passwater via DotNetMonster.com | last post by:
I'm working on a app that displays according to a registry key value. The user needs the ability to update the display, and hense the registry key (via a click event on a popup menu). This all worked just fine until some users were set up as power-users. I've tried to change the permissions on that key programatically, on the fly, but to no avail. Here's my question: While the user is logged in with limited permissions, will the...
0
1201
by: Isabelle | last post by:
Hi I have posted this in the microsoft.public.frontpage newsgroups. Since it involves both Frontpage ext. 2002 on a windows 2000 Advanced's web server, and ASP.Net (framework 1.0), I decided to post here too. So here is the post I sent on the other newsgroups, please read and tell me if you have seen this. Note: By the way, here the developers don't have the choice, they have to use FP to deploy.
2
2972
by: Carlos | last post by:
Hi Forum, Is there a way to change the database access permissions for different IP addresses without having to re-start PostgreSQL? I often want to preclude all IP address but one from accessing the database. Currently, I change the pg_hba.conf file and re-start the database but I would like to be able to do the same thing without having to re-start.
0
9404
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10009
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8835
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.