Chmod with Apache on Windows

  • phatgalaxy
  • Novice
  • Novice
  • phatgalaxy
  • Posts: 32

Post 3+ Months Ago

Hey guys I am running apache http server on windows and I need a little help. Im familiar with CHmodding with linux systems but how do you CHMOD or do the CHMOD equilivent on windows. more specifically with APACHE web servers. Get what im saying.. thanks
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6375
  • Loc: twitter.com/unflux

Post 3+ Months Ago

title edit for the topic and moved to hosting
  • darkermoon
  • Expert
  • Expert
  • User avatar
  • Posts: 542
  • Loc: Riverdale, MD

Post 3+ Months Ago

right click. Properties > security. I don't know how to do it by command prompt or if you can by FTP though, if that's what you're asking. I'd imagine there must be a way.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Well, unless the filesystem is NTFS then permissions aren't going to come into play at all. If you're using Fat32, then every file on the system is essentially chmod 777 :)
  • darkermoon
  • Expert
  • Expert
  • User avatar
  • Posts: 542
  • Loc: Riverdale, MD

Post 3+ Months Ago

NTFS is so much better. I despise FAT32.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23454
  • Loc: Woodbridge VA

Post 3+ Months Ago

darkermoon wrote:
NTFS is so much better. I despise FAT32.


Then you don't chmod you set permissions. You can't do it via FTP - you need to do it on your server.
  • phatgalaxy
  • Novice
  • Novice
  • phatgalaxy
  • Posts: 32

Post 3+ Months Ago

Like i said right now my site is being hosted on a linux machine. I can change CHMOD with FTP.. With the types of scripts im using.. CHMODDING is pretty essential. I dont really want people to just index all my folders. u know so 777 isnt gona work. I was hoping there was like some software i could get to work with apache to change that.. How exactly would u set folder/file permissions with windows you know?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23454
  • Loc: Woodbridge VA

Post 3+ Months Ago

Well actually you didn't say your site was hosted on a linux machine. What you said was:
Quote:
I am running apache http server on windows


You also asked this:
Quote:
how do you CHMOD or do the CHMOD equilivent on windows.


You also asked this:
Quote:
How exactly would u set folder/file permissions with windows you know


You aren't entirely clear on what you're doing.

You change permissions by right clicking the folder and selecting security. However, You might want to read a couple books or tutorials on Windows permissions. It's not the easiest thing in the world to get right, but is easy once you get it right.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Just a thought.

You also might want to throw an .htaccess file in that directory if security is your concern here.
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

The equivalent of 777 on Windows is giving the local IUSER_MachineName Full Control over your virtual directory. If you REMOVE the IUSER_ account from the permissions list, it's essensially the same thing as .htaccess on a *nix machine, because IIS's anon user won't have permissions to access any of your files.

This makes for a non-public site (or file, or directory.. depends on how you set the permissions).

You can't change file or directory permissions (CHMOD) on a windows machine remotely without administrative (root) access to the server. There are some tools available, but any administrator that would give that level of rights to remote users when a public webserver is involved should be fired, or enjoy having megabytes of russian animal porn being uploaded to his server daily...

If you don't have admin rights, you will have to ask the server administrator to change permissions for you....


BUT.

From what you said originally:
Quote:
I dont really want people to just index all my folders


I'm not sure this is a permissions issue anyway. Just make sure directory browsing is disabled for your website in IIS, and/or make sure you have a file in every directory named whatever the defaul document is (index.html, default.htm, index.asp... whatever). That way, no one will be able to pull a server-generated directory listing.

.c
  • phatgalaxy
  • Novice
  • Novice
  • phatgalaxy
  • Posts: 32

Post 3+ Months Ago

Like i said my site is currently being hosted on a LINUX machine.. But Like i have said. I plan on making my own ded server which will run on WINDOWS. For instance.. If i download a script it says to chmod something to 755. How would I do that in windows?
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

phatgalaxy wrote:
Like i said my site is currently being hosted on a LINUX machine.. But Like i have said. I plan on making my own ded server which will run on WINDOWS. For instance.. If i download a script it says to chmod something to 755. How would I do that in windows?


You don't.

You right click on the file, select properties, the the security tab, then pick the users or groups that have permissions, and what those permissions are. 777 is the same as Full Control. 755 would, I think, be Read/Write/Modify. But it's a misnomer, because that unix convention doesn't really translate to Windows the same way. The Anon user that IIS impersonates for every non-authenticated web session is IUSER_MachineName (if you're machine is named XIN, as my home system is, then it would be IUSER_XIN)

In general, the IUSER should only have Read Only permissions set. In rare cases, you can give the IUSER higher permissions.

However. The 755 convention also incorprorates whether the user can execute scripts. Windows doesn't do it that way. You set that in the IIS website admin panel instead. There's a dropdown under, I think, the Home Directory tab, that lest you select Script Access (or something) from None, Scripts Only, or Scripts and Executables. If you're doing CGI, you must select the last one. If you install PHP on IIS, it runs as CGI, so... there you go.

Perl CGI runs like crap (in my opinion) on windows, and it's a pain to install and configure... it was for me anyway, although it's been years since I tried. PHP works fine though.. I suggest you ditch Perl CGI unless you have absolutly no other choice.

.c
  • Foxy
  • Guru
  • Guru
  • User avatar
  • Posts: 1038
  • Loc: places..

Post 3+ Months Ago

you dont need to do chmod on windows. Its non essiential
  • G-Stress
  • Born
  • Born
  • G-Stress
  • Posts: 2

Post 3+ Months Ago

Hi guys, I'm havin a bit of a problem as well with Apache and I guess file permissions since I'm running windows. What I've done is installed Apache 2.0.55 and php 5.1.4. For Apache I created a directory on my C:\ partition (C:\myserver) to host the files for my web server.

The problem I'm having is on my index.htm page when trying to authenticate a username & password log in I get the following Not Found error:

The requested URL /php/php.exe/save.php was not found on this server.

After installing php it installed to C:\php so I have the files php.exe and save.php both in C:\php and my web server directory C:\myserver. I was told to chmod to 777, but I'm not sure how to do such a thing as I'm just now starting php. Then I stumbled across this post and saw the add permissions for "IUSR_MACHINE". I made that change on 3 different files and the problem still persists. I was told to make the change for a text file that will store the usernames and passwords. I tried that with the same result, then I added the permissions to save.php and php.exe and I still get the same error.

I would really appreciate it if someone could lead me in the right direction to correcting my problem.
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

Apache uses a different permission mechanism. IUSR is an IIS convention.... To be honest, I don't know anything about setting up Apache on windows, so I can't really help you there other than to wane preachy for a second. Here's some good words to live by when setting up software:

When In Rome.....

That is, if you are on a Microsoft platform system, use technologies designed for the MS platform. Apache was not designed for Windows, nor was PHP, nor was mySQL. Instead, use IIS, ASP.NET and SQL Server (or SQL Server Express or whatever they call it these days). You will find setting up software that is designed for the platform your setting it up on is WAY easier than trying to implement ports of software because, all actual software compatibility issues aside, the documentation is usually all written for the native platform, not the ported-to platform. Hence, the chmod 777... you don't do that on windows, it doesn't work that way...

Anyway, there you go... =]

.c
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

http://www.semitekie.com/viewtopic.php?t=8
  • G-Stress
  • Born
  • Born
  • G-Stress
  • Posts: 2

Post 3+ Months Ago

this213 thank you sooooo much for the link it worked perfectly:) Carnix thanks for the advice an effort to give me a better understanding of the situation:) Thanks again guys.
  • lsabug
  • Born
  • Born
  • lsabug
  • Posts: 1

Post 3+ Months Ago

Hi,
I'm still not clear on the correct Apache user that would correspond to the one that IIS automatically creates, iusr_ ? I've read the Apache docs and it says that you should create a new user that will run the Apache service and, if I understand correctly, this is the user that would work similarily to the IIS iusr. Is my interpretation correct? For those web directories that need write access, I would grant this permission to the Apache service user?
Thanks.
Lsabug

Post Information

  • Total Posts in this topic: 18 posts
  • Users browsing this forum: No registered users and 7 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
 
cron
 

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