更改文件夹的Ubuntu Linux操作系统的读/写访问 [英] Change read/write access of a folder in Ubuntu Linux

查看:327
本文介绍了更改文件夹的Ubuntu Linux操作系统的读/写访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在创建的文件夹中的亚马逊EBS创建一个文件夹,并写入一个文件从一个Java servlet卷安装在Amazon EC2上运行Ubuntu。

I want to create a folder and write a file in the created folder in an Amazon EBS volume from a Java Servlet installed on Amazon EC2 running Ubuntu.

我已经安装了EBS卷在

I have mounted the EBS volume at

/mnt/my-address

但Servlet是无法创建文件夹并写入文件?

But the Servlet is unable to create the folder and write the file?

我的提问

为什么的Java sevlet无法创建文件夹在Amazon EBS安装的卷?

Why Java sevlet is not able to create a folder on Amazon EBS mounted volume?

推荐答案

看起来你的文件夹没有正确的读/写权限。

Looks like your folder does not have the correct read/write permissions.

尝试授予读写访问到所有用户问题的目录,例如:

Try granting read-write access to all users to the directory in question, e.g.:

sudo chmod -R ugo+rw /mnt/my-address

如果你用不授予写权限的一切,你可以微调的权限,所有权和组打球,但我需要更多的信息关于您的设置,以帮助你这一点。

If you are uncomfortable with granting write permissions to all, you could fine tune the permissions by playing with ownership and groups, but I would need more info about your setup to help you with that.

修改:如果EC2用户是唯一一个需要访问,你可以改变目录的所有权给用户,然后授予仅他访问:

Edit: if the ec2-user is the only one needing access, you could change the ownership of the directory to that user and then grant access to only him:

sudo chown -R ec2-user:ec2-user /mnt/my-address
sudo chmod -R u+rw,go-rw /mnt/my-address

这篇关于更改文件夹的Ubuntu Linux操作系统的读/写访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆