Solaris 10 autofs directory permissions - Solution

Problem
 Description
==================================================

OS 5.10 Generic_127127-11

Simple client auto_master / auto_direct setup [OS 5.10
Generic_127127-11], see files below

/etc # cat auto_master
/- /etc/auto_direct

/etc # cat /etc/auto_direct
/sysadmin/audit/output -rw londeploy-p1:/sysadmin/audit/output
/sysadmin/audit/bin londeploy-p1:/sysadmin/audit/bin

Directories shared [on 5.9 Generic_117171-15] as:

# share -F nfs -o rw,anon=0 -d "Audit Home" /sysadmin/audit/output #
share -F nfs -o ro -d "Audit Home" /sysadmin/audit/bin

# AutoFS service [refreshed]

/etc # svcs | grep -i autofs
online 9:16:10 svc:/system/filesystem/autofs:default

PROBLEM
-----------

Automounted directories loose permissions once automounted

Before :

drwxr-xr-x 2 root other 4608 Jul 22 10:22 output
drwxr-xr-x 2 root other 512 Jul 22 10:19 bin

After [IE After cd'ing into directory]:

dr-xr-xr-x 1 root root 1 Jul 22 09:29 output
dr-xr-xr-x 1 root root 1 Jul 22 09:29 bin

# cd output
bash: cd: output: Permission denied
# id
uid=0(root) gid=0(root)

Can anyone tell me why my directory permissions are changing and how to
make them persistant with automountd?


Solution ==================================================
If the execute permission is set, it becomes an executable map which is
a shell script that outputs the required automount commands, but can
include extra logic to determine which mounts should be made. From
automount(1M):

Local maps that have the execute bit set in their file per-
missions will be executed by the automounter and provided
with a key to be looked up as an argument. The executable
map is expected to return the content of an automounter map
entry on its stdout or no output if the entry cannot be
determined. A direct map cannot be made executable.

Simply chmod'd my /etc/auto_direct from 755 to 644 and the problem was
resolved.



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值