Unstoppable Domains

CronJob Help?!

Spaceship Spaceship
Watch

Hazard

Established Member
Impact
5
Hey all, i am in need of some help with my site freephpbb.org. It is a free forum hosting site, and everything works fine, except once the forum is created, i do not have the permissions to edit any files!

Obviously this is frustrating, as anything illegal hosted there, i cannot edit...

I have asked a few people and they said that i need to setup a cronjob, and i have absolutely no idea what i am doing! So i am here asking for help!

MSN: **Email Edited** requested by OP

If you can help me out in anyway, please PM me or add me to MSN, i'd be so greatfull! :]
 
Last edited by a moderator:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
no idea why you have been told that you need to setup a cron, all a cron does is run a particular script at the time specified (linux version of windows task schedular)

The problem you are having is that the files have the ownership of root most likely (thats what your server software most liklely runs under).

You will need to write into the script a command that will chown the files. (thats providing you have the right permissions to do so on the server)
 
0
•••
Cheers filth, just one more thing, how would i write that into the script? Can you help me out with that? :]
 
0
•••
you would need to look at http://uk2.php.net/chown

take particular attention to greg _at_ rhythmicdesign d.o.t com's comment
 
0
•••
filth said:
The problem you are having is that the files have the ownership of root most likely (thats what your server software most liklely runs under).
Yikes! If that's the case then fixit immediately. Running httpd as root is insanely dangerous. In fact it takes some serious tweaking to get a decent web server to run as root.

There is probably a better way to go about changing permissions than writing a cron job. You might try setting the umask from within your script, adding your maintenance uid to a group that has access to the files. Before you run out and try anything make sure it's not an SELinux problem. Do an ls -Z, and if it honks at you about not having SELinux kernel then you don't have to worry about that posibility.
 
0
•••
lol, damn i wish i knew all this jargon :p

I thought i was quite up-to-date with it, but half of that u just said prima, i just totally blanked out on! :lol:

Any chance of being shown/helped in doing this? :]

I have logged into Shell, and tried to change users using the chown code, but obviously i need to know the current user (ROOT i am guessing) but it also asks for a group, without that, how do i know what to change?!
 
0
•••
If you want to know what user you are logged in as type “whoami”. To change to root type “su” and then type the password when asked. To check to see if you're running SE type “ls -Z”. To see the permissions on the files type “ls -l”(lowercase L). The output from those command will tell you a lot. Give that a try and give us some more details before you jump into changing any ownerships or permissions.
 
0
•••
ok, i have typed in whoami, and it is showing the user i login as, which is a good start i guess! :) Upon typing su, and inputting my password, it is telling me it is incorrect.
Upon typing ls -l, i get the file list, everything is set to my current user, except public_html which is set to nobody.

When i go into public_html & do ls -l again, all forums hosted there, the user is set to nobody! I am guessing this is where the problem is, if it is, how would i go about fixing it?

p.s. Thank you alot for your help prima! :D
 
0
•••
You'll need the root password in order to su to root. If you don't already have it you will probably not be able to get it.
It looks like your httpd is set to run as the user Nobody. This is a good configuration. I take it the public_html is in your home directory and contains all your HTML.
There are still a few bits of information necessary to fully understand your configuration. It would be nice to know the permissions (I assume -rwxr-xr-x), and is always a good idea to check if your running SE “ls -Z”
But I think I have a basic idea, You can't write to the files because you don't own them, and the permissions only allow the owner to write. What you can do is to write to them from a PHP script, or to change the permissions from a PHP script. For example, to change permissions on your public_html directory so it is globaly readable/writeable you could run this script from the web:
<?
`chmod -R 777 /home/users/me/public_html`;
?>
This would work since it would execute as “Nobody” Then you (and everyone else) would be able to read and write the files. Note that it is possible that you can't call this command from PHP due to securtiy settings. Try it on a single file (without the -R), and see if it works, ie:

`chmod 777 /home/users/me/public_html/somefile.php`;
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back