Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
[PAYH] How do you change the owner and the group for a file or directory
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] How do you change the owner and the group f...
[PAYH] How do you change the owner and the group for a file or directory
16-01-2009 3:43 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I have upload some files and want them to be writable by the user that php runs as but I can't find a way in Plesk to change the group or the owner so my only option seems to be to make them world writable which is not a nice solution.
Anyone know how to do a chown or chgrp in PAYH (preferably chown/chgrp -R)
Anyone know how to do a chown or chgrp in PAYH (preferably chown/chgrp -R)
Message 1 of 6
(1,240 Views)
5 REPLIES 5
Re: [PATH] How do you change the owner and the group for a file or directory
16-01-2009 3:56 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi
You can run shell commands by using cron, please take a look at the link below:
http://usertools.plus.net/tutorials/id/68
You can run shell commands by using cron, please take a look at the link below:
http://usertools.plus.net/tutorials/id/68
Message 2 of 6
(387 Views)
Re: [PATH] How do you change the owner and the group for a file or directory
16-01-2009 5:07 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I think it is worth mentioning that you can only change the owner of a file/directory if you are root, and unless you are root you can only change the group to one you are a member of. That somewhat restricts your scope with doing anything with these commands.
David
Message 3 of 6
(387 Views)
Re: [PATH] How do you change the owner and the group for a file or directory
16-01-2009 5:37 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
It's a roundabout way of doing it, but:
If you have off-line copies of the folders and files, you can upload them with a PHP script (such as webadmin.php) and that will get them owned by www-data. If they're just in your PAYH space, dowload them using FTP and load them back up again using webadmin.php (or similar).
Gabe
If you have off-line copies of the folders and files, you can upload them with a PHP script (such as webadmin.php) and that will get them owned by www-data. If they're just in your PAYH space, dowload them using FTP and load them back up again using webadmin.php (or similar).
Gabe
Message 4 of 6
(387 Views)
Re: [PATH] How do you change the owner and the group for a file or directory
16-01-2009 6:28 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Both of the solutions suggested sound like workarounds, but neither is particularly pleasant.
Could the httpdocs dir not be set up with it's sticky bit set for the group so it's the www-data group instead of psacln (whatever that is).
Could the httpdocs dir not be set up with it's sticky bit set for the group so it's the www-data group instead of psacln (whatever that is).
Message 5 of 6
(387 Views)
Re: [PAYH] How do you change the owner and the group for a file or directory
17-01-2009 9:04 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
In the end I wrote a script to recursively copy the uploaded data so that it would have the right permissions and ownership but that failed due to SAFE MODE restrictions.
Message 6 of 6
(387 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] How do you change the owner and the group f...