MyBB Community Forums

Full Version: Upload form...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to be able to limit the file size and types, rename the file as ("player_" + $minetest_username)" (minetest_username is a custom profile feild )and I want them to be able to delete their file and upload a new one after a set time. The site is hosted on a Ubuntu 12.04 VPS with MySQL


I have made simple upload scripts in the past, but I barely know basic PHP. I have no idea how to make it so a user can only have 1 file uploaded at a time or the renaming thing...
It would be very insecure to give the webserver root permissions. You'd probably want to write a script to upload and move the image to a temporary directory and use cron to move the image to the above directory.
Good idea, I could put that in the cron.hourly directory. I know shell scripting pretty well. I just stink at PHP, I understand the basic syntax- but only just.
thinking out loud...

if you are the only account using that textures folder/minetest app, use php to make it a local upload to your account like any other attachment, then symlink that textures folder to it. no root permissions issues that way. since it is symlinked to your account, there is no way to exploit it backwards to get root access *unless there is a kernel bug or or similar