March 22nd, 2008
these rules will allow Windows for Workgroups to differentiate the two files on behalf of the poor individual who is forced to see the network through the eyes of that operating system. Note that the same long filename should always hash to the same mangled name with Samba; this doesn t always happen with Windows. The downside of this approach is that there can still be collisions; however, the chances are greatly reduced. You generally want to use the mangling configuration options with only the oldest clients. We recommend doing this without disrupting other clients by adding an includedirective to the smb.conf file: 166
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.
Posted in MySQL5 | No Comments »
March 22nd, 2008
5.4.1 The Samba Mangling Operation Here is how Samba mangles a long filename into an 8.3 filename: If the original filename does not begin with a dot, up to the first five alphanumeric characters that occur before the last dot (if there is one) are converted to uppercase. These characters are used as the first five characters of the 8.3 mangled filename. If the original filename begins with a dot, the dot is removed and up to the first five alphanumeric characters that occur before the last dot (if there is one) are converted to uppercase. These characters are used as the first five characters of the 8.3 mangled filename. These characters are immediately followed a special mangling character: by default, a tilde (~), although Samba allows you to change this character. The base of the long filename before the last period is hashed into a two-character code; parts of the name after the last dot may be used if necessary. This two character code is appended to the 8.3 filename after the mangling character. The first three characters after the last dot (if there is one) of the original filename are converted to uppercase and appended onto the mangled name as the extension. If the original filename began with a dot, three underscores (___) are used as the extension instead. Here are some examples: virtuosity.dat VIRTU~F1.DAT .htaccess HTACC~U0.___ hello.java HELLO~1F.JAV team.config.txt TEAMC~04.TXT antidisestablishmentarianism.txt ANTID~E3.TXT antidiseast.txt ANTID~9K.TXT
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.
Posted in MySQL5 | No Comments »
March 22nd, 2008
Samba Robert Eckstein, David Collier-Brown, Peter Kelly 1st Edition November 1999 1-56592-449-5, Order Number: 4495 416 pages, $34.95 Buy the hardcopy Table of Contents Chapter 5 Browsing and Advanced Disk Shares 5.4 Name Mangling and Case Back in the days of DOS and Windows 3.1, every filename was limited to eight upper-case characters, followed by a dot, and three more uppercase characters. This was known as the 8.3 format, and was a huge nuisance. Windows 95/98, Windows NT, and Unix have since relaxed this problem by allowing many more case-sensitive characters to make up a filename. Table 5.6 shows the current naming state of several popular operating systems. Table 5.6: Operating System Filename Limitations Operating System File Naming Rules DOS 6.22 or below Eight characters followed by a dot followed by a three-letter extension (8.3 format); case insensitive Windows 3.1 for Eight characters followed by a dot followed by a three-letter extension Workgroups (8.3 format); case insensitive Windows 95/98 127 characters; case sensitive Windows NT 127 characters; case sensitive Unix 255 characters; case sensitive Samba still has to remain backwards compatible with network clients who store files only in the 8.3 format, such as Windows for Workgroups. If a user creates a file on a share called antidisestablishmentarianism.txt, a Windows for Workgroups client couldn t tell it apart from another file in the same directory called antidisease.txt. Like Windows 95/98 and Windows NT, Samba has to employ a special methodology of translating a long filename to an 8.3 filename in such a way that similar filenames will not cause collisions. This is called name mangling, and Samba deals with this in a manner that is similar, but not identical to, Windows 95 and its successors. 165
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.
Posted in MySQL5 | No Comments »
March 21st, 2008
Setting this option to yescauses an occasional surprise on Unix when a user notices that a data file is marked as executable, but rarely causes harm. If a user tries to run it, he or she will normally get a string of error messages as the shell tries to execute the first few lines as commands. The reverse is also possible; an executable Unix program looks like it hasn t been backed up recently on Windows. But again, this is rare, and is usually harmless. 5.3.2.9 map system The DOS system attribute is used to indicate files that are required by the operating system, and should not be deleted, renamed, or moved without special effort. Set this option only if you need to store Windows system files on the Unix file server. Executable Unix programs will appear to be non-removable special Windows files when viewed from Windows clients. This may prove mildly inconvenient if you want to move or remove one. For most sites, however, this is fairly harmless. 5.3.2.10 map hidden DOS uses the hidden attribute to indicate that a file should not ordinarily be visible in directory listings. Unix doesn t have such a facility; it s up to individual programs (notably the shell) to decide what to display and what not to display. Normally, you won t have any DOS files that need to be hidden, so the best thing to do is to leave this option turned off. Setting this option to yescauses the server to map the hidden flag onto the executable-by-others bit (0001). This feature can produce a rather startling effect. Any Unix program that is executable by world seems to vanish when you look for it from a Windows client. If this option is not set, however, and a Windows user attempts to mark a file hidden on a Samba share, it will not work Samba has no place to store the hidden attribute! 5.2 Filesystem Differences 5.4 Name Mangling and Case O Reilly Home | O Reilly Bookstores | How to Order | O Reilly Contacts International | About O Reilly | Affiliated Companies 1999, O Reilly & Associates, Inc. 164
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.
Posted in MySQL5 | No Comments »
March 21st, 2008
programs that require the archive bit. Unix lacks the notion of an archive bit entirely. Backup programs typically keep a file that lists what files were backed up on what date, so comparing file modification dates serves the same purpose. 163
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.
Posted in MySQL5 | No Comments »
March 20th, 2008
5.3.2.3 force create mode This option sets the permission bits that Samba will force to be set when a file permission change is made. It s often used to force group permissions, mentioned previously. It can also be used to preset any of the DOS attributes we mentioned: archive (0100), system (0010), or hidden (0001). This option always takes effect after the maparchive, mapsystem , maphidden, and createmaskoptions. Many Windows applications rename their data files to datafile.bak and create new ones, thus changing their ownership and permissions so that members of the same Unix group can t edit them. Setting force create mask = 0660will keep the new file editable by members of the group. 5.3.2.4 force directory mode This option sets the permission bits which Samba will force when a directory permission change is made or a directory is created. It s often used to force group permissions, as mentioned previously. This option defaults to 0000, and can be used just like the forcecreatemodeto add group or other permissions if needed. This option always takes effect after the map archive, mapsystem, maphidden, and directorymaskoptions. 5.3.2.5 force group This option, sometimes called group, assigns a static group ID that will be used on all connections to a service after the client has successfully authenticated. This assigns a specific group to each new file or directory created from an SMB client. 5.3.2.6 force user The forceuseroption assigns a static user ID that will be used on all connections to a service after the client has successfully authenticated. This assigns a specific user to each new file or directory created from an SMB client. 5.3.2.7 delete readonly This option allows a user to delete a directory containing a read-only file. By default, DOS and Windows will not allow such an operation. You probably will want to leave this option turned off unless a program needs this capability; many Windows users would be appalled to find that they d accidentally deleted a file which they had set read-only. In fact, even the Unix rm command will ask users if they really want to override the protection and delete read-only files. It s a good idea to have Samba be at least as cautious. 5.3.2.8 map archive The DOS archive bit is used to flag a file that has been changed since it was last archived (e.g., backed up with the DOS archive program.) Setting the Samba option maparchive=yes causes the DOS archive flag to be mapped to the Unix execute-by-owner (0100) bit. It s best to leave this option on if your Windows users are doing their own backups, or are
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.
Posted in MySQL5 | No Comments »
March 20th, 2008
Table 5.5: File and Directory Permission Options Option Parameters Function Default Scope map archive boolean Preserve DOS archive attribute in user execute bit (0100). yes Share map system boolean Preserve DOS system attribute in group execute bit (0010). no Share map hidden boolean Preserve DOS hidden attribute in world execute bit (0001). no Share create mask (create mode) numeric Sets the maximum permissions for files created by Samba. 0744 Share directory mask (directory mode) numeric Sets the maximum permissions for directories created by Samba. 0755 Share force create mode numeric Forces the specified permissions (bitwise or) for directories created by Samba. 0000 Share force directory mode numeric Forces the specified permissions (bitwise or) for directories created by Samba. 0000 Share force group (group) string (group name) Sets the effective group for a user accessing this share. None Share force user string (username) Sets the effective username for a user accessing this share. None Share delete readonly boolean Allows a user to delete a read-only file from a writable directory. no Share 5.3.2.1 create mask The argument for this option is an octal number indicating which permission flags may be set at file creation by a client in a share. The default is 0755, which means the Unix owner can at most read, write, and optionally execute his or her own files, while members of the user s group and others can only read or execute them. If you need to change it for non-executable files, we recommend 0644, or rw-r–r–. Keep in mind that the execute bits may be used by the server to map certain DOS file attributes, as described earlier. If you re altering the create mask, those bits have to be part of the create mask as well. 5.3.2.2 directory mask The argument for this option is an octal number indicating which permission flags may be set at directory creation by a client in a share. The default is 0755, which allows everyone on the Unix side to at most read and traverse the directories, but allows only you to modify them. We recommend the mask 0750, removing access by world users. 162
You want to have a cheap webhost for your apache application, then check apache web hosting services.
Posted in MySQL5 | No Comments »
March 19th, 2008
[data] path = /home/samba/data browseable = yes guest ok = yes writeable = yes create mask = 744 directory mask = 755 force user = joe force group = accounting These options actually assign a static Unix user and group to each connection that is made to a share. However, this occurs after the client authenticates; it does not allow free access to a share. These options are frequently used for their side effects of assigning a specific user and group to each new file or directory that is created in a share. Use these options with discretion. Finally, one of the capabilities of Unix that DOS lacks is the ability to delete a read-only file from a writable directory. In Unix, if a directory is writable, a read-only file in that directory can still be removed. This could permit you to delete files in any of your directories, even if the file was left by someone else. DOS filesystems are not designed for multiple users, and so its designers decided that read-only means “protected against accidental change, including deletion,” rather than “protected against some other user on a single-user machine.” So the designers of DOS prohibited removal of a read-only file. Even today, Windows file systems exhibit the same behavior. Normally, this is harmless. Windows programs don t try to remove read-only files because they know it s a bad idea. However, a number of source-code control programs - which were first written for Unix - run on Windows and require the ability to delete read-only files. Samba permits this behavior with the deletereadonlyoption. In order to enable this functionality, set the option to yes: [data] path = /home/samba/data browseable = yes guest ok = yes writeable = yes create mask = 744 directory mask = 755 force user = joe force group = accounting delete readonly = yes 5.3.2 File and Directory Permission Options The options for file and directory permissions are summarized in Table 5.5; each option is then described in detail. 161
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.
Posted in MySQL5 | No Comments »
March 19th, 2008
5.3.1 Creation masks Samba has several options to help with file creation masks. File creation masks (or umasks) help to define the permissions a file or directory will receive at the time it is created. In Unix, this means that you can control what permissions a file or directory does not have when it is created. For files accessed from Windows, this means you can disable the read-only, archive, system, and hidden attributes of a file as well. For example, the createmaskoption will force the permissions of a file created by a Windows client to be at most 744: [data] path = /home/samba/data browseable = yes guest ok = yes writeable = yes create mask = 744 while the directorymaskoption shown here will force the permissions of a newly created directory to be at most 755: [data] path = /home/samba/data browseable = yes guest ok = yes writeable = yes directory mask = 755 Alternatively, you can also force various bits with the forcecreatemodeand force directorymodeoptions. These options will perform a logical OR against the file and directory creation masks, ensuring that those bits that are specified will always be set. You would typically set these options globally in order to ensure that group and world read/write permissions have been set appropriately for new files or directories in each share. In the same spirit, if you wish to explicitly set the Unix user and group attributes of a file that is created on the Windows side, you can use the forceuserand forcegroupoptions. For example: 160
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.
Posted in MySQL5 | No Comments »
March 19th, 2008
the executable permission bits of the file on the Unix side - if it is instructed to do so. Mapping these bits, however, has an unfortunate side-effect: if a Windows user stores a file in a Samba share, and you view it on Unix with the ls-alcommand, some of the executable bits won t mean what you d expect them to. Three Samba options decide whether the bits are mapped: maparchive, mapsystem, and maphidden. These options map the archive, system, and hidden attributes to the owner, group, and world execute bits of the file, respectively. You can add these options to the [data]share, setting each of their values as follows: [data] path = /home/samba/data browseable = yes guest ok = yes writeable = yes map archive = yes map system = yes map hidden = yes After that, try creating a file in the share under Unix - such as hello.java- and change the permissions of the file to 755. With these Samba options set, you should be able to check the permissions on the Windows side and see that each of the three values has been checked in the Properties dialog box. What about the read-only attribute? By default, Samba 2.0 sets this whenever a file does not have the Unix owner write permission bit set. In other words, you can set this bit by changing the permissions of the file to 555. We should warn you that the default value of the maparchiveoption is yes, while the other two options have a default value of no. This is because many programs do not work properly if the archive bit is not stored correctly for DOS and Windows files. The system and hidden attributes, however, are not critical for a program s operation and are left to the discretion of the administrator. Figure 5.7 summarizes the Unix permission bits and illustrates how Samba maps those bits to DOS attributes. Note that the group read/write and world read/write bits do not directly translate to a DOS attribute, but they still retain their original Unix definitions on the Samba server. Figure 5.7: How Samba and Unix view the permissions of a file 159
From our experience, we can recommend PHP5 Web Hosting services, if you need affordable webhost to host and run your web application.
Posted in MySQL5 | No Comments »