linux文件夹里禁止新增文件夹,linux – Docker:使用ADD添加的文件夹上的权限被拒绝...

我正在尝试使用docker配置

postgresql安装.

FROM ubuntu:13.10

ADD . /db

# install postgres

# ...

RUN chown postgres:postgres /db -R && \

chmod 700 /db -R

USER postgres

RUN /etc/init.d/postgresql start &&\

createdb test &&\

psql -d test -f /db/all.sql

我可以访问文件夹/ db,但不能访问/ db / plpgsql(包含/db/all.sql执行的文件)

我在/ db / plpgsql上尝试了chmod 777,但它也不起作用,权限被拒绝.

postgres@c364bdd94652:/$ls -l | grep db

drwxrwxrwx 5 postgres postgres 4096 Jul 10 17:39 db

postgres@c364bdd94652:/$cd db/

postgres@c364bdd94652:/db$ls -l

-rwxrwxrwx 1 postgres postgres 2567 Jul 10 16:34 Dockerfile

-rwxrwxrwx 1 postgres postgres 358 Jul 10 14:53 all.sql

-rwxrwxrwx 1 postgres postgres 642 Jul 10 15:35 init.sql

drwxrwxrwx 10 postgres postgres 4096 Jul 10 16:36 plpgsql

postgres@c364bdd94652:/db$cd plpgsql/

bash: cd: plpgsql/: Permission denied

我如何访问该文件夹?

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值