WoodWing Help Center

Configuring an external Windows file store for Mac OS using Apache

Configuring an external Windows file store for Mac OS using Apache

This article describes how to configure Enterprise Server to run on a Mac OS X Server machine (using an Apache HTTP server) while the File Store is located on a Windows (2000) machine.

Analysis

Apache uses a so called "www" user whenever the Enterprise Server (PHP code) accesses the file system. However, this is not a 'real' user with a normal login procedure, and it has no shell access. Shell access is required though to be able to mount the File Store, and a login is required to let the user 'own' the mounted File Store.

Note: In this article we assume that the Windows machine is named 'WINMACH'.

Configuration steps

1. Creating the shared File Store on the Windows machine

2. Creating a special www user on the Macintosh system for shell access

3. Configuring the special www user for Apache

4. Mounting the Windows share folder on the Macintosh system

5. Configuring the shared folder for Enterprise Server on the Macintosh system

6. Testing the accessibility of the Enterprise File Store

7. Disconnecting the mounted folder from the Macintosh system

1. Creating the shared File Store on the Windows machine

Step 1. Create a shared folder somewhere on the system.

Example: c:\WinShare.

Step 2. Create a special user (winusr) with Full Control access rights to the shared folder.

Note: Make sure this user has a proper password; this is not just for security reasons but it also improves performance.

Step 3. Remove the predefined "Everyone" user from the shared folder.

Step 4. Create the File Store folder within the shared folder.

Example: c:\WinShare\FileStore.

Step 5. Create the export folder within the shared folder.

Example: c:\WinShare\FileStore\Export.

Step 6. Check if you can access the export folder from any remote location (path: \WINMACH\WinShare\FileStore\Export).

2. Creating a special www user on the Macintosh system for shell access

Step 1. From the Utilities folder, start NetInfo Manager and choose users >www.

Step 2. Duplicate the www user ("www copy").

Step 3. Rename 'www copy' to a more useful name.

Example: wwwusr.

Step 4. Change the 'uid' field into something unique.

Step 5. Change the 'shell' field into '/bin/bash'.

Step 6. Change the 'passwd' field.

Note: Make sure this user has a proper password; this is not just for security reasons but it also improves performance.

3. Configuring the special www user for Apache

Step 1. Open the following file in a plain ascii editor:

/etc/httpd/httpd.conf

Step 2. Change the "User www" setting into "User wwwusr".

Step 3. Check if the "Group www" setting is present.

Step 4. Save the file.

Step 5. Restart the Personal Web Sharing service (using System Preferences > Sharing).

4. Mounting the Windows share folder on the Macintosh system

Access the Terminal and type the following commands:

Step 1. Log in as aroot user:

su root

Step 2. Create the WinMount folder in the root folder:

mkdir /WinMount

Step 3. Make the WinMount folder accessible to the special www user:

chown wwwusr:www /WinMount

Step 4. Dot folder is owned by wwwusr and group www:

ls -als /WinMount

Step 5. Log in as www user:

su wwwusr

Step 6. Create a mount to the Windows share with full access for the www user:

mount_smbfs -f 0700 //winusr@WINMACH/WinShare /WinMount

Step 7. Check if the created mount '//winusr@WINMACH/WinShare' is listed:

df

Step 8. Check if you can see the Export folder for which the wwwusr user and www group are set:

ls -als /WinMount/FileStore

5. Configuring the shared folder for Enterprise Server on the Macintosh system

Tip: (For Enterprise Server 10.1 or higher only) Easily manage and configure settings of all configuration files by adding them to a single configuration file.

Step 1. Open the following file in a plain ascii editor:

/Library/WebServer/Documents/Enterprise/config/config.php

Step 2. Let the ATTACHMENTDIRECTORY and EXPORTDIRECTORY options for "Mac OS X & Linux" point to the shared folder:

...
if( OS == 'WIN' )
	define ('ATTACHMENTDIRECTORY', 'c:/FileStore');
else // Mac OS X & UNIX:
	define ('ATTACHMENTDIRECTORY', '/WinMount/FileStore/Export/');
...
...
if( OS == 'WIN' )
	define ('EXPORTDIRECTORY', 'c:/FileStore/Export/');
else // Mac OS X & UNIX:
	define ('ATTACHMENTDIRECTORY', "/WinMount/FileStore");
...

Step 3. Save the file.

6. Testing the accessibility of the Enterprise File Store

Step 1. Start a Web browser and access the Enterprise test page:

http://<Server URL>/server/wwtest/testfileserver.php

There should be NO red warnings about access failures shown. If there are, resolve them.

Step 2. Start any client application (InCopy/InDesign/Content Station) and upload a new file.

There should be no (SOAP) errors appearing.

Step 3. Close and re-open the uploaded file and view the version history.

A new version should be created.

7. Disconnecting the mounted folder from the Macintosh system

Access the Terminal and type the following commands:

su wwwusr

umount -f /WinMount

Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.