Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
[PAYH] Permissions Issue
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- [PAYH] Permissions Issue
[PAYH] Permissions Issue
27-10-2008 3:41 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi,
I created a protected directory for use by a PHP application. I have now removed the protection from it via the control panel but I am now left with two sub directories created by the application which have an owner of www-data and I cannot delete them!
Any suggestions?
Andy
I created a protected directory for use by a PHP application. I have now removed the protection from it via the control panel but I am now left with two sub directories created by the application which have an owner of www-data and I cannot delete them!
Any suggestions?
Andy
Message 1 of 3
(931 Views)
2 REPLIES 2
Re: [PAYH] Permissions Issue
27-10-2008 4:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi Andy,
There will be a way of doing this with the Control Panel - but I'm not familiar (yet) with the PlusNet Plesk CP, so here is a clumsy way using PHP code, which should work as you used PHP to create them, and so they will share the same security credentials (user/group)
If this is a one off problem, a way to achieve it is this:
Save the above (suitably modified for your directories and files) to a file on your server, eg zap.php then invoke it via a browser eg http://yourdomain.plushost.co.uk/zap.php
You can read up on the two functions used, ie
Man page for unlink
Man page for rmdir
(which have some working code examples to do this more elegantly, using iterators to first empty then remove, directories)
Say if anything isn't clear; HTH
There will be a way of doing this with the Control Panel - but I'm not familiar (yet) with the PlusNet Plesk CP, so here is a clumsy way using PHP code, which should work as you used PHP to create them, and so they will share the same security credentials (user/group)
If this is a one off problem, a way to achieve it is this:
<?php
// First remove (unlink) any files within the directories
unlink('/path/to/dir1/fileA');
unlink('/path/to/dir2/fileB');
unlink('/path/to/dir2/etc');
// We can now remove (rmdir) the now empty directories
rmdir('/path/to/dir1');
rmdir('/path/to/dir2');
?>
Save the above (suitably modified for your directories and files) to a file on your server, eg zap.php then invoke it via a browser eg http://yourdomain.plushost.co.uk/zap.php
You can read up on the two functions used, ie
Man page for unlink
Man page for rmdir
(which have some working code examples to do this more elegantly, using iterators to first empty then remove, directories)
Say if anything isn't clear; HTH
Message 2 of 3
(312 Views)
Re: [PAYH] Permissions Issue
28-10-2008 9:45 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi Pod,
Thanks for the bit of PHP it did the trick.
The PHP code is less clumsy that trying to find functions in the control panel 😉
An additional note, I found a PHP filemanager http://phpfm.sourceforge.net/ which works well enough to sort out various file issues.
Andy
Thanks for the bit of PHP it did the trick.
The PHP code is less clumsy that trying to find functions in the control panel 😉
An additional note, I found a PHP filemanager http://phpfm.sourceforge.net/ which works well enough to sort out various file issues.
Andy
Message 3 of 3
(312 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- [PAYH] Permissions Issue