Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 01:36 pm EST
Geeklog Forums
Filemgmt and ownership
CTheSoup
Anonymous
I'm using the filemgmt plugin. I uploaded a file via the plugin, but it seems to be assigning the permissions of the webserver (I assume) because instead of the owner and group being my username (which everything else is) it is a number (48). The perms on the file that is uploaded is 600, so I don't have ownership of the file to change anything. I can have my hosting company admin change the ownership, but this doesn't address the bigger issue of keeping this from happening in the future. Any ideas?
Thanks,
Christian
Thanks,
Christian
10
14
Quote
Status: offline
Blaine
Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Check and see what the setting is for $filemgmtFilePermissions in the plugin config.php.
The plugin will execute a chmod (change permissions) on the files after uploading to this setting.
Also, verify that you get the same behaviour if you upload a file as admin (which does not need approval) and as a non-admin user (which requires approval). The code is different for these 2 upload functions.
Geeklog components by PortalParts -- www.portalparts.com
The plugin will execute a chmod (change permissions) on the files after uploading to this setting.
Also, verify that you get the same behaviour if you upload a file as admin (which does not need approval) and as a non-admin user (which requires approval). The code is different for these 2 upload functions.
Geeklog components by PortalParts -- www.portalparts.com
13
13
Quote
Status: offline
cthesoup
Forum User
Junior
Registered: 11/07/03
Posts: 16
My config does not have any mention of $filemgmtFilePermissions in it. My config.php for my filemgmt plugin is:
<br />$filemgmt_version = "1.2";<br />$_FM_TABLES['filemgmt_cat'] = $_DB_table_prefix . 'filemgmt_category';<br />$_FM_TABLES['filemgmt_filedetail'] = $_DB_table_prefix . 'filemgmt_filedetail';<br />$_FM_TABLES['filemgmt_filedesc'] = $_DB_table_prefix . 'filemgmt_filedesc';<br />$_FM_TABLES['filemgmt_brokenlinks'] = $_DB_table_prefix . 'filemgmt_broken';<br />$_FM_TABLES['filemgmt_modreq'] = $_DB_table_prefix . 'filemgmt_mod';<br />$_FM_TABLES['filemgmt_votedata'] = $_DB_table_prefix . 'filemgmt_votedata';<br />$_FM_TABLES['filemgmt_history'] = $_DB_table_prefix . 'filemgmt_downloadhistory';<br /><br />// Include the Filemgmt Plugin configuration which defines Directories and URL's and options<br />// This file is set via the Filemgmt Plugin Admin menu - Configuration settings. Thus needs to be a seperate file.<br />include ("filemgmt.php");<br /><br />?><br />
Help?!
Thanks,
Christian
Text Formatted Code
<br /><br />$filemgmt_version = "1.2";<br />$_FM_TABLES['filemgmt_cat'] = $_DB_table_prefix . 'filemgmt_category';<br />$_FM_TABLES['filemgmt_filedetail'] = $_DB_table_prefix . 'filemgmt_filedetail';<br />$_FM_TABLES['filemgmt_filedesc'] = $_DB_table_prefix . 'filemgmt_filedesc';<br />$_FM_TABLES['filemgmt_brokenlinks'] = $_DB_table_prefix . 'filemgmt_broken';<br />$_FM_TABLES['filemgmt_modreq'] = $_DB_table_prefix . 'filemgmt_mod';<br />$_FM_TABLES['filemgmt_votedata'] = $_DB_table_prefix . 'filemgmt_votedata';<br />$_FM_TABLES['filemgmt_history'] = $_DB_table_prefix . 'filemgmt_downloadhistory';<br /><br />// Include the Filemgmt Plugin configuration which defines Directories and URL's and options<br />// This file is set via the Filemgmt Plugin Admin menu - Configuration settings. Thus needs to be a seperate file.<br />include ("filemgmt.php");<br /><br />?><br />
Help?!
Thanks,
Christian
13
15
Quote
Status: offline
Blaine
Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
I was mistaken - thats from a new version I was working on sometime ago.
I can probally be convinced to package this up and send it to you. Send me a email if this is that important to you.
Geeklog components by PortalParts -- www.portalparts.com
I can probally be convinced to package this up and send it to you. Send me a email if this is that important to you.
Geeklog components by PortalParts -- www.portalparts.com
13
16
Quote
Status: offline
jlhughes
Forum User
Full Member
Registered: 04/25/02
Posts: 154
I've taken a utility Bharat Mediratta wrote for Gallery and updated it so that it CHMODs all of the files in the file management data and tmp directories so that the files can be modified or deleted. (In my case, I needed to download the entire directory so that I could move the site.)
You must be logged in as a file management user in order to execute the script.
You can get a copy of the script here.
You must be logged in as a file management user in order to execute the script.
You can get a copy of the script here.
14
13
Quote
Status: offline
noke
Forum User
Chatty
Registered: 10/22/03
Posts: 37
I'm having the same problem with the CHMOD setting itself to 600. Is there and easy work around for this yet, I'm rather new to this and I've gotten a bit stuck.
I tried the script that jlhughes made but after the errors during install, there was no change
I too am gonna be stuck with out this plugin
http://www.worldclubdjs.com
I tried the script that jlhughes made but after the errors during install, there was no change
I too am gonna be stuck with out this plugin
http://www.worldclubdjs.com
16
10
Quote
Status: offline
lifer
Forum User
Newbie
Registered: 02/01/04
Posts: 6
Warning: move_uploaded_file(/public_html/filemgmt_data/category_snaps/2703.png): failed to open stream: No such file or directory in /home/lifer/public_html/admin/plugins/filemgmt/index.php on line 700
I Keep Getting This Error. CHMOD Is Set At 777 On All Folders, I Changed The Locations To Root And Public_html Folder, Where Am I Doing Wrong
I Keep Getting This Error. CHMOD Is Set At 777 On All Folders, I Changed The Locations To Root And Public_html Folder, Where Am I Doing Wrong
13
27
Quote
Status: offline
Turias
Forum User
Full Member
Registered: 10/20/03
Posts: 807
Quote by lifer: Warning: move_uploaded_file(/public_html/filemgmt_data/category_snaps/2703.png): failed to open stream: No such file or directory in /home/lifer/public_html/admin/plugins/filemgmt/index.php on line 700
I Keep Getting This Error. CHMOD Is Set At 777 On All Folders, I Changed The Locations To Root And Public_html Folder, Where Am I Doing Wrong
I Keep Getting This Error. CHMOD Is Set At 777 On All Folders, I Changed The Locations To Root And Public_html Folder, Where Am I Doing Wrong
/public_html/filemgmt_data/category_snaps/2703.png?
Shouldn't that be
/home/lifer/public_html/filemgmt_data/category_snaps/2703.png?
Check your paths.
18
10
Quote
Status: offline
brooz
Forum User
Newbie
Registered: 10/25/03
Posts: 8
I have been watching this thread and Blaine... you know exactly what the problem is it sounds like. Have you finished your update to Filemgmt 1.2? I have searched the world over and have found no love... but this;
// the uploaded file is set to chmod 600, and is
// unreadable by webserver
chmod($dest, 0644);
// makes it so webserver can read the new file
(courtesy of some off the wall site I found (here) through a google frenzy I was on)
The only problem is... I have no clue currently how to stick this info into the script/s
without breaking the whole thing to peices. (I am no code guru...
I know enough to make muh self mad)
My installation of the File Manager 1.2 was flawless and it works like a champ. No errors and no sign of a problem until you want to download the files or check out the screenshots. These leaves me having to manually change the permissions from 600 to something readable (644, 775, 777, etc.).
If I have missed a post, or a solution has already been provided, I apologize for trying to rehash... but could you please, PRETTY PLEASE... point me in the right direction?
I could probably figure this out if I was hosting this on my own machine, but this is my brothers site who's hosted elsewhere then my house (for the time being), and I have no control over the PHP, server settings, etc.. Thank you very much for what ever you can relay in advance.
Life is like a box of chocolates... even if you ate them all and got a stomach ache, sooner or later you'd eat another box!
Text Formatted Code
// the uploaded file is set to chmod 600, and is
// unreadable by webserver
chmod($dest, 0644);
// makes it so webserver can read the new file
(courtesy of some off the wall site I found (here) through a google frenzy I was on)
The only problem is... I have no clue currently how to stick this info into the script/s
without breaking the whole thing to peices. (I am no code guru...
I know enough to make muh self mad)
My installation of the File Manager 1.2 was flawless and it works like a champ. No errors and no sign of a problem until you want to download the files or check out the screenshots. These leaves me having to manually change the permissions from 600 to something readable (644, 775, 777, etc.).
If I have missed a post, or a solution has already been provided, I apologize for trying to rehash... but could you please, PRETTY PLEASE... point me in the right direction?
I could probably figure this out if I was hosting this on my own machine, but this is my brothers site who's hosted elsewhere then my house (for the time being), and I have no control over the PHP, server settings, etc.. Thank you very much for what ever you can relay in advance.
Life is like a box of chocolates... even if you ate them all and got a stomach ache, sooner or later you'd eat another box!
12
12
Quote
Status: offline
Blaine
Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Quote by brooz: I have been watching this thread and Blaine... you know exactly what the problem is it sounds like. Have you finished your update to Filemgmt 1.2? I
I have released two test versions of the 1.3 release on my site and announced it here on this site in the forum post here
Geeklog components by PortalParts -- www.portalparts.com
12
15
Quote
All times are EST. The time is now 01:36 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content