Consequently, there is (Free web hosts) no use for any of

March 18th, 2008

Consequently, there is no use for any of the three Unix executable bits that are present on a file in a Samba disk share. DOS files, however, have their own attributes that need to be preserved when they are stored in a Unix environment: the archive, system, and hidden bits. Samba can preserve these bits by re
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

The definition of each of those bits follows: (Cool web site)

March 18th, 2008

The definition of each of those bits follows: Read-only The file s contents can be read by a user but cannot be written to. System This file has a specific purpose required by the operating system. Hidden This file has been marked to be invisible to the user, unless the operating systems is explicitly set to show it. Archive This file has been touched since the last DOS backup was performed on it. Note that there is no bit to specify that a file is executable. DOS and Windows NT filesystems identify executable files by giving them the extensions .EXE, .COM, .CMD, or .BAT. 158
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

Samba Robert Eckstein, David Collier-Brown, Peter (Java web server) Kelly 1st

March 17th, 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.3 File Permissions and Attributes on MS-DOS and Unix DOS was never intended to be a multiuser, networked operating system. Unix, on the other hand, was designed that way from the start. Consequently, there are inconsistencies and gaps in coverage between the two filesystems that Samba must not only be aware of, but also provide solutions for. One of the biggest gaps is how Unix and DOS handle permissions with files. Let s take a look at how Unix assigns permissions. All Unix files have read, write, and execute bits for three classifications of users: owner, group, and world. These permissions can be seen at the extreme left-hand side when a ls-al command is issued in a Unix directory. For example: -rwxr–r–1 tom users 2014 Apr 13 14:11 access.conf Windows, on the other hand, has four principal bits that it uses with any file: read-only, system, hidden, and archive. You can view these bits by right-clicking on the file and choosing the Properties menu item. You should see a dialog similar to Figure 5.6.[1] [1] The system checkbox will probably be greyed for your file. Don t worry about that - you should still be able to see when the box is checked and when it isn t. Figure 5.6: DOS and Windows file properties 157
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

5.2.3.8 veto files More stringent than the hidden (Jetty web server)

March 17th, 2008

5.2.3.8 veto files More stringent than the hidden files state is the state provided by the vetofilesconfiguration option. Samba won t even admit these files exist. You cannot list or open them from the client. In reality, this isn t a trustworthy security option. It is actually a mechanism to keep PC programs from deleting special files, such as ones used to store the resource fork of a Macintosh file on a Unix filesystem. If both Windows and Macs are sharing the same files, this can prevent ill-advised power users from removing files the Mac users need. The syntax of this option is identical to that of the hidefilesconfiguration option: each entry must begin, end, or be separated from another with a slash (/) character, even if only one pattern is listed. Asterisks can be used as a wildcard to represent zero or more characters. Questions marks can be used to represent exactly one character. For example: veto files = /*config/*default? / This option is primarily administrative - not a substitute for good file permissions. 5.2.3.9 delete veto files This option tells Samba to delete vetoed files when a user attempts to delete the directory in which they reside. The default value is no. This means if a user tries to delete a directory that contains a vetoed file, the file (and the directory) will not be deleted. Instead, the directory will remain and appear to be empty from the perspective of the user. If set to yes, the directory and the vetoed files will be deleted. 5.1 Browsing 5.3 File Permissions and Attributes on MS-DOS and Unix O Reilly Home | O Reilly Bookstores | How to Order | O Reilly Contacts International | About O Reilly | Affiliated Companies 1999, O Reilly & Associates, Inc. 156
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

keep client users from browsing (Web site directory) into directories that

March 16th, 2008

keep client users from browsing into directories that might have sensitive files. See our example earlier in this section. 5.2.3.3 follow symlinks This option, which is discussed in greater detail earlier, controls whether Samba will follow a symbolic link in the Unix operating system to the target, or if it should return an error to the client user. If the option is set to yes, the target of the link will be interpreted as the file. 5.2.3.4 getwd cache This global option specifies whether Samba should use a local cache for the Unix getwd()(get current working directory) system call. You can override the default value of yes as follows: [global] getwd cache = no Setting this option to yescan significantly increase the time it takes to resolve the working directory, especially if the widelinksoption is set to no. You should normally not need to alter this option. 5.2.3.5 wide links This option specifies whether the client user can follow symbolic links that point outside the shared directory tree. This includes any files or directories at the other end of the link, as long as the permissions are correct for the user. The default value for this option is yes. Note that this option will not be honored if the followsymlinksoptions is set to no. Setting this option to noslows smbd considerably. 5.2.3.6 hide files The hidefilesoption provides one or more directory or filename patterns to Samba. Any file matching this pattern will be treated as a hidden file from the perspective of the client. Note that this simply means that the DOS hidden attribute is set, which may or may not mean that the user can actually see it while browsing. Each entry in the list must begin, end, or be separated from another entry with a slash (/) character, even if there is only one pattern listed. This allows spaces to appear in the list. Asterisks can be used as a wildcard to represent zero or more characters. Questions marks can be used to represent exactly one character. For example: hide files = /.jav*/README.??? / 5.2.3.7 hide dot files The hidedotfilesoption hides any files on the server that begin with a dot (.) character, in order to mimic the functionality behind several shell commands that are present on Unix systems. Like hidefiles, those files that begin with a dot have the DOS hidden attribute set, which doesn t necessarily guarantee that a client cannot view them. The default value for this option is yes. 155
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

Table 5.4: Filesystem Configuration Options Option Parameters Function (Windows 2003 server web)

March 16th, 2008

Table 5.4: Filesystem Configuration Options Option Parameters Function Default Scope unix realname boolean Provides Unix user s full name to client. no Global dont descend string (list of directories) Indicates a list of directories whose contents Samba should make invisible to clients. None Share follow symlinks boolean If set to no, Samba will not honor symbolic links. yes Share getwd cache boolean If set to yes, Samba will use a cache for getwd()calls. yes Global wide links boolean If set to yes, Samba will follow symbolic links outside the share. yes Share hide dot files boolean If set to yes, treats Unix hidden files as hidden files in Windows. yes Share hide files string (list of files) List of file patterns to treat as hidden. None Share veto files string (list of files) List of file patterns to never show. None Share delete veto files boolean If set to yes, will delete files matched by veto fileswhen the directory they reside in is deleted. no Share 5.2.3.1 unix realname Some programs require a full username in order to operate. For example, a Windows email program often needs to associate a username with a given real name. If your system password file contains the real names of users in the GCOS field, the unixrealnameoption instructs Samba to provide this information to clients. Without it, the name of the user will simply be his or her login ID. For example, if your Unix password file contains the following line: rcollins:/KaBfco47Rer5:500:500:Robert Collins: /home/rcollins:/bin/ksh And the option in the configuration file is: [global] unix realname = yes then the name Robert Collins will be provided to any client that requests the real name of user rcollins. You typically don t need to bother with this option. 5.2.3.2 dont descend The dontdescendoption can be used to specify various directories that should appear empty to the client. Note that the directory itself will still appear. However, Samba will not show any of the contents of the directory to the client user. This is not a good option to use as a security feature (a user could probably find a way around it); it really is meant only as a convenience to 154
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Business web hosting - Finally, let s discuss the widelinksoption. This option, if

March 15th, 2008

Finally, let s discuss the widelinksoption. This option, if set to yes, allows the client user to follow symbolic links that point outside the shared directory tree, including files or directories at the other end of the link. For example, let s assume that we modified the [data]share as follows: [data] path = /home/samba/data browseable = yes guest ok = yes writeable = yes case sensitive = no follow symlinks = yes wide links = yes As long as the followsymlinksoption is enabled, this will cause Samba to follow all symbolic links outside the current share tree. If we create a file outside the share (for example, in someone s home directory) and then create a link to it in the share as follows: ln -s ~tom/datafile ./datafile then you will be able to open the file in Tom s directory as per the target file s permissions. 5.2.3 Filesystem Options Table 5.4 shows a breakdown of the options we discussed earlier. We recommend the defaults for most, except those listed in the following descriptions. 153
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

Figure 5.4: Contents of the [data] share with (Web design conference)

March 15th, 2008

Figure 5.4: Contents of the [data] share with dont descend 5.2.2 Links DOS and NT filesystems don t have symbolic links; Windows 95/98/NT systems approximate this with “shortcuts” instead. Therefore, when a client tries to open a symbolic link on a Samba server share, Samba attempts to follow the link to find the real file and let the client open it, as if he or she were on a Unix machine. If you don t want to allow this, set the followsymlinks option: [data] path = /home/samba/data browseable = yes guest ok = yes writeable = yes case sensitive = no follow symlinks = no You can test this by creating a directory on the Unix server inside the share as the user that you are logging in with. Enter the following commands: % mkdir hello; cd hello % cat “This is a test” >hello.txt % ln -s hello.txt “Link to hello” This results in the two files shown in the window in Figure 5.5. Normally, if you click on either one, you will receive a file which has the text “This is a test” inside of it. However, with the followsymlinksoption set to no, you should receive an error similar to the dialog in Figure 5.5 if you click on “Link to hello.” Figure 5.5: An error dialog trying to follow symbolic links when forbidden by Samba 152
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

[data] path = /home/samba/data browseable = yes guest

March 15th, 2008

[data] path = /home/samba/data browseable = yes guest ok = yes writeable = yes case sensitive = no veto files = /*.java/*README* / The syntax of this option is identical to the hidefilesconfiguration option: each entry must begin, end, or be separated from another with a slash (/) character, even if there is only one pattern listed. By doing so, the files hello.javaand READMEwill simply disappear from the directory, and the user will not be able to access them through SMB. There is one other question that we need to address. What happens if the user tries to delete a directory that contains vetoed files? This is where the deletevetofilesoption comes in. If this boolean option is set to yes, the user is allowed to delete both the regular files and the vetoed files in the directory, and the directory itself will be removed. If the option is set to no, the user will not be able to delete the vetoed files, and consequently the directory will not be deleted either. From the user s perspective, the directory will appear to be empty, but cannot be removed. The dontdescenddirective specifies a list of directories whose contents Samba should not allow to be visible. Note that we say contents, not the directory itself. Users will be able to enter a directory marked as such, but they are prohibited from descending the directory tree any farther they will always see an empty folder. For example, let s use this option with a more basic form of the share that we defined earlier in the chapter: [data] path = /home/samba/data browseable = yes guest ok = yes writeable = yes case sensitive = no dont descend = config defaults In addition, let s assume that the /home/samba/data directory has the following contents: drwxr-xr-x 6 tom users 1024 Jun 13 09:24 . drwxr-xr-x 8 root root 1024 Jun 10 17:53 . . -rw-r–r–2 tom users 1024 Jun 9 11:43 README drwxr-xr-x 3 tom users 1024 Jun 13 09:28 config drwxr-xr-x 3 tom users 1024 Jun 13 09:28 defaults drwxr-xr-x 3 tom users 1024 Jun 13 09:28 market If the user then connects to the share, he or she would see the directories shown in Figure 5.4. However, the contents of the /config and /defaults directories would appear empty to the user, even if other folders or files existed in them. In addition, users cannot write any data to the folder (which prevents them from creating a file or folder with the same name as one that is already there but invisible). If a user attempts to do so, he or she will receive an “Access Denied” message. dontdescendis an administrative option, not a security option, and is not a substitute for good file permissions. 151
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Web hosting bandwidth - the hidefilesoption. For example, let s assume that we

March 14th, 2008

the hidefilesoption. For example, let s assume that we specified the following in our example [data]share: [data] path = /home/samba/data browseable = yes guest ok = yes writeable = yes case sensitive = no hide files = /*.java/*README* / Each entry for this option must begin, end, or be separated from another with a slash (/) character, even if there is only one pattern listed. This convention allows spaces to appear in filenames. In this example, the share directory would appear as shown in Figure 5.3. Again, note that we have set the Windows 98 option to view hidden files for the window. Figure 5.3: Hiding files based on filename patterns If we want to prevent users from seeing files at all, we can instead use the vetofilesoption. This option, which takes the same syntax as the hidefilesoption, specifies a list of files that should never be seen by the user. For example, let s change the [data] share to the following: 150
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.