At the moment I use Oracle VM on a local environment, but the final intention is to utilize it in the server.
Filesystem type is xfs
and the OS of VM is Ubuntu but if needed I can install any other one.
What I want to do is, the server has some devs and each connect via SSH. The /home
is mounted on /dev/sda1
where /
is. /dev/sda2
is mounted on /app
with below structure:
/app
project1
v1
v1.0.1
project2
v0.1
v0.2
designs
d1
d2
There are some users like user1
, users2
, etc. user1
has only access to /app/project1/v1
and user2
has only access to /app/project2/v0.1
.
I have tried restricting quota with xfs_quota
, but this application can only restrict quota on the main directory (in my case, /app
), and it cannot set quota for /app/project1/v1
for user1
, and when I run this command:
xfs_quota -xc 'limit bsoft=5g bhard=5d user1' /app/project1/v1
I get this error:
xfs_quota: cannot setup path for mount
/app/project1/v1
: No such device or address
lsblk
's result:
sda
|
--sda1
--sda2
|--root 20G lvm /
|--home 60G lvm /home
I don't want to limit specific user on whole /home
, but I need to restrict them on specific directories. In my case, I want to limit user1
to project1
to 5g
for example and limit him to designs/d1
to 4g. The directories in the future will be created and added more, and I just want to add limitation for each newly created directories.