I'm probably going about this all wrong....
But I've been using IMCE to support file uploads to my site for scripts and stuff for a MUD I play....
I have the basic IMCE correctly set up, and I was using the snippet that was an example...
php: return 'users/'.$user->name;
I also set up users as browseable by all (we're all about sharing code), but only the $user can upload/delete/create subdirs in their own folder. The problem I'm running into is (yes, I have sub-directories checked) I can't seem to allow uploads to subdirs that the users create in their own folder....
i.e.
-root
-users
-karvec
-tintin
-Ace
-Testing
I can see all the other user's dirs fine (Ace), but I can't upload to tintin (my subdir) or browse other subdirs (Ace->Testing)
I'm assuming there's a code snippet or something stupid I missed....
Any suggestions?
Comments
Comment #1
karvec CreditAttribution: karvec commentedSolved, had to remove all code/user permissions, rebuild permissions, and then add the permissions for User-1 again.
Comment #2
Taxoman CreditAttribution: Taxoman commentedComment #3
florisla CreditAttribution: florisla commentedI was just bitten by a very similar issue:
The only thing that was changed was that I added new permissions (below the existing line regarding folder 'users/'.$user->name) on folder 'users', read-only, including subfolders.
What got rid of this issue was removing the line with permissions on folder 'users/'.$user->name , and add exactly the same permissions again *below* the line with 'users' permissions.
Comment #4
bradp CreditAttribution: bradp commentedI believe that adding all permissions to 'users' on a line below 'users/'.$user->name will give everyone write access to everyone else's folder. I couldn't get the php line correct to try it.
I found the best way to do this was to give read only access to all folders using /.
Then on the line below it:
/php: return 'users/'.$user->name;
Before doing this I had similar problems with not being able to write to newly created directories. Apparently, putting /. with read only access after the user->name line overrides the write permissions for sub folders.
A note about this in the help paragraph below the Directories field would be helpful.