Advertisement

Unix under Windows

Started by July 29, 2003 05:37 PM
8 comments, last by Greg K 21 years, 6 months ago
My university uses Unix for all it''s web hosting and e-mail servers. I use windows at home. I am making a web site that is hosted by my university but I don''t know how to change file permissions from my Windows machine. Is there a way to set file permissions through windows? Failing that, is there a way to access the Unix command line from my home computer (windows)? -Greg Reverie Entertainment
Most good ftp clients will allow you to change the permissions as needed for unix machines.

James Simmons
MindEngine Development
http://medev.sourceforge.net
Advertisement
Thank you. What is a good (free) FTP client?
-Greg

Reverie Entertainment
The best thing to do is get Putty or SSH.

Both are Win32 SSH clients. I like SSH from ssh.com.

http://www.ssh.com/support/downloads/secureshellwks/non-commercial.html

This is a free one for non-commercial use. It has an Secure FTP client portion with drag and drop support, I used to use it all the time before I bought my Powerbook. Great for just transfering files (and securely) to your Unix directories from your Windows machine.

I believe you can even set the umask value in the SSH client so when you transfer items over they automatically get the proper chmod values. You might have to run a chown as well. I used to write a little batch script to call the SSH client to transfer entire directories, then run SSH commands to the server to set permissions or do other things (like strip windows end of line chars).

As for changing file permission from the windows machine, I think just looking up chown and chmod from your SSH shell will get what you need.

Int.
Of course, this assumes you have SSH connections to your Uni. I''ve been to 4 of them and everyone has had SSH connections to their Unix servers. Assuming yours is no different =).

Int.
My personal favorite and 100% free is LeechFTP.

When you''re connected to the server you just right click on one of the files and select ''Set Attributes'' and it lets you change the permissions.

James Simmons
MindEngine Development
http://medev.sourceforge.net
Advertisement
Thank you both very much.
-Greg

Reverie Entertainment
One more question:
Are there any text editors that create Unix friendly text files? For instance, does it matter if I use notepad to write cgi/php scripts or will the windows formatting mess up the file?

-Greg

Reverie Entertainment

[edited by - Greg K on July 29, 2003 7:16:28 PM]
There is VI for windows, probably Emacs as well.

It's pretty simple to convert files. Most Unix systems have the utility unix2dos and dos2unix to convert eol chars to the appropriate system. To be honest, it doesn't usually create problems unless you go to view Unix files on Windows, where you don't have new lines (notepad mucks it up, Textpad, Write.exe handle it ok). The ^M chars all over my files in VI drives me insane, so I usually clean them out with a simple macro in vi or the two utilities I mentioned earlier.

For web pages and such shouldn't make a difference though, just cosmetic. Though, to be frank I don't do much web development (just some simple CGI wrappers to shell utilities for my compatriots at work.

You could also do a simple tr on the file:

cat -v [dosfile] | tr -d "^M" > [unixfile]

You could also get the Win32 program TextPad, I think UltraEdit32 also support Unix files directly. You just have to set up your options in those editors to use Unix EOL instead of Dos if you're primarly doing Unix work in Win32 environment and transfering. TextPad is free with an annoying popup to buy a copy every once in a while when saving files. UltraEdit32 I think is also shareware with time expiration.

Write.exe might have that option as well, but to be honest, doesn't have enough features =)

Int.

[edited by - Interim on July 29, 2003 8:04:01 PM]
I think write.exe does let you save with unix-style newlines...

This topic is closed to new replies.

Advertisement