Unlimited web hosting - [data] path = /home/samba/data browseable = yes guest
[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
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.