Per Madsen <permandREMOVE@cool.dk> wrote:
> Steen Larsen <steen.remove@this.lykking.dk> wrote:
>
> > Apache har intet med FTP at gøre. Hvad er det for noget med Terminal?
> > Der er indbygget FTP-server i Mac OS X. Gå i sytem-prefs/sharing og
> > aktivér FTP.
>
> Jeg mener bare at kunne huske at jeg skulle have gang i noget
> terminalhalløj. Sys/prefs. that's it? Og så ellers vælge hvilke mapper
> jeg vil dele?!
Du skal ikke rode med terminalen for at bruge den indbyggede server. Det
fungerer dog ikke helt som du vist har tænkt dig.
Når FTP-serveren er aktiveret, så kan brugere på din maskine logge ind
via ftp på maskinen. Dvs. at hvis du skal have adgang for mange
mennesker, så skal de alle oprettes som brugere, eller også skal du
oprette en specifik ftp-bruger. Det sidste er nok det bedste. Når de så
logger ind, kommer man ind i den brugers Home-mappe. Du kan altså ikke
vælge individuelle mapper som skal deles, som man f.eks. gjorde i Mac OS
9.
Som standard kan en bruger desværre bevæge sig rundt i filsystemet,
altså ud af sin Home-mappe. Det klares ved at følge dette hint:
"With the release of 10.0.2, Apple has included an upgraded FTP server
that makes it easier to control which directories FTP users can utilize.
This is done using an 'ftpchroot' file, which makes each listed user's
home directory appear as the root of the system via FTP, so there's no
way they can move "up" out of their directories.
Implementing 'ftpchroot' is quite simple, but it does require a bit of
editing work as root. If you'd like to restrict your FTP users to their
own directory, read the rest of this tip.
This only works for users who exist as users on your system. You may
want to create a generic 'ftpuser' for such purposes. For this example,
we'll assume you have two users, 'tom' and 'ftpuser', and you'd like to
restrict both of them to their home directories.
1. Open a terminal and type cd /etc to change into the 'etc'
directory.
2. We'll use pico as the text editor, since this is a very simple
file. Type sudo pico ftpchroot and enter your normal admin user's
password when prompted.
3. When the file opens, simply type each user's short name on a
line of its own:
ftpuser
tom
4. Save the file by typing Control-X.
That's it! You've created the file you need to restrict FTP users'
access.
To implement the file, you will probably have to restart your network --
you could try disabling and re-enabling FTP from the Sharing prefs
panel, but a full restart will definitely do the trick! If you ever need
to add more users, just follow these directions and add additional rows
for each new user you wish to restrict.
To test the restrictions, find another machine, make sure your OS X box
has FTP enabled, and connect via FTP as one of the restricted users. You
should NOT be able to navigate up from your starting location. If you
can, then something's not working correctly. I have tested this tip
myself, and it works exactly as described here - thanks, Apple, for
getting rid of this relatively large security hole! Note that FTP still
transmits passwords in cleartext, which is why setting up an "ftpuser"
may be a good idea."
Jeg håber det hjalp. Jeg ville oprindelige have postet et link til den
oprindelige MacOSXHints side, men jeg kan desværre ikke få fat i siden i
øjeblikket.
--
Mvh.
René Frej Nielsen
Now running PowerMac G4 Dual 867 Mhz, 512 MB RAM,
200 GB HD, SuperDrive & Mac OS X Jaguar. Yeah!