Jump to content
Sign in to follow this  
Dave -OFPL-

Xml chmod 777

Recommended Posts

I have the tmp2302 folder as being chmod 777, aswell as the players + squads folders inside it, when someone connects in creates the players folder, which for some reason isnt chmod 777.

so .jpeg logos wont write in.

I think i need to change it so that files are uploaded/created are automatically chmod 777, anyone know how to do this?

Im running redhat btw.

any help appreciated.

Share this post


Link to post
Share on other sites

If the directory is created with the users permission (the user running the server) all must be ok. Then you don't need the 777 permission. 755 is ok then.

The first number is permission for the user, second for the group and third for world.

Do you have the option about max filesize set in the config file? This can be a problem when the file is bigger.

edit:

ah.. now I think I know what you mean. You have a directory for different users (login-names) where the can put the files. Now you want to set permissions, that the server can put in the neccessary pictures and other things.

You can force creation as user (user who runs the server) with doing a chmod 4775 (or 6775) to the directory. Then all files under this directory will be created as the owner (and group) of the directory.

If example you do this, you then have the following:

(the s shows the force of userownership and groupownership)

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

gate ofp # chmod 6775 users

gate ofp # ls -l

drwsrwsr-x 3 alex users 4096 Mar 4 20:31 users

<span id='postcolor'>

Now all files in directory users will be created with ownership of alex.users.

But force of 777 is not possible (or I don't know at the moment).

But you can write a small shell script which checks permissions and change them if they are wrong. Run over cron every x minutes.

Hope this helps a bit. If not, I hope some other put in a better solution.

Share this post


Link to post
Share on other sites

The tmp2302 directory is automatically created by the dedicated server. All squad xml, custom faces (and probably sounds) are stored there by the dedicated server when a player connects.

I have the dedicated server running as root, which is probably why I don't have any problems with access rights. So this would be a possibility, albeit unsecure.

A more secure way would probably be to have the dedicated server running as root, but in a chroot jail. I haven't tried that one myself, though.

Share this post


Link to post
Share on other sites

Check the value for "umask", it's the default file permissions mask. "umask 022" would set default permissions to 755.

Running something as root which does not need root privileges is never more secure. My linux server is running as a normal user and i have no problems with permissions, i can check my settings for the tmnp2302 folder if you like...

Share this post


Link to post
Share on other sites

Thanks Benu,

I tried your method, it made all my folders+files executable by all and readable by all but not writeable...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×