CHMOD Not Working Properly - Bad Server Config?

  • Warlord
  • Born
  • Born
  • Warlord
  • Posts: 1

Post 3+ Months Ago

I'm no web host manager or anythin of the sort, I'm simply a programmer but I have reason to believe the webhost I'm using is badly configured and I need help on how to tell the guy who hosts it how to fix it.

Basically, an example is this:

I have 2 directories...

public_html/server (CHMOD is 755 which is default)
public_html/server/logs (CHMOD is 755 which is default)

In public_html/server I have a file called 'admin.php.' When an admin logs into the script in 'admin.php' a log of the event is written to public_html/server/logs/adminlog.txt.

I don't want public users, however, to be able to access adminlog.txt so I CHMOD adminlog.txt and remove the 'execute' attribute for public users (this is right, yes?). However, it does absolutely nothing. The file is still accessible from the public domain. If I remove the read/write attributes for public users then 'admin.php' is no longer able to write to it.

This makes me think that the webhost thinks that the php files have public access, rather than 'group' access or 'owner' access?

If I CHMOD the 'logs' directory and remove the 'execute' attribute, even if adminlog.txt has all attributes turned on then 'admin.php' is still unable to write to the file.

Any ideas on what's wrong and how to fix it?
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4922
  • Loc: NY

Post 3+ Months Ago

Aren't you supposed to remove the "read" attribute, not the execute on that file? Execute let's the public change directories. Removing it doesn't stop them from reading a file once the directory is changed?

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 8 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.