Skip to content

Commit 5bf2c9b

Browse files
committed
Create a couple of writeable folders in each user home directory (hestiacp#580)
1 parent 5555103 commit 5bf2c9b

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ All notable changes to this project will be documented in this file.
3535
- Performance: Do not resolve ip when listing iptables rules. Server tab could take multiple minutes to load in some cases.
3636
- Update jQuery to 3.4.1 and adjust includes.
3737
- Fixed cronjob issue with sftp jail due to missing user.
38-
- Fixed issue #569 Remote backup hostname would reject ip addr without reverse dns (PTR record)
38+
- Fixed issue #569 Remote backup hostname would reject ip addr without reverse dns (PTR record).
39+
- Create a couple of writeable folders in each user home directory (#580).
3940

4041
## [1.0.5] - 2019-08-06 - Hotfix
4142
### Bugfixes

bin/v-add-user

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ if [ ! -z "$DNS_SYSTEM" ]; then
9797
chmod 751 $HOMEDIR/$user/conf/dns
9898
fi
9999

100+
# Create default writeable folders
101+
mkdir $HOMEDIR/$user/.config $HOMEDIR/$user/.local $HOMEDIR/$user/.composer
102+
chown $user:$user $HOMEDIR/$user/.config $HOMEDIR/$user/.local \
103+
$HOMEDIR/$user/.composer
104+
100105
# Set permissions
101106
chmod a+x $HOMEDIR/$user
102107
chattr +i $HOMEDIR/$user/conf > /dev/null 2>&1

install/upgrade/versions/latest.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,11 @@ if [ -e "/etc/cron.d/hestia-sftp" ]; then
7373
if ! cat /etc/cron.d/hestia-sftp | grep -q 'admin'; then
7474
echo "@reboot admin /usr/local/hestia/bin/v-add-sys-sftp-jail" > /etc/cron.d/hestia-sftp
7575
fi
76-
fi
76+
fi
77+
78+
# Create default writeable folders for all users
79+
for user in $($HESTIA/bin/v-list-sys-users plain); do
80+
mkdir -p $HOMEDIR/$user/.config $HOMEDIR/$user/.local $HOMEDIR/$user/.composer
81+
chown $user:$user $HOMEDIR/$user/.config $HOMEDIR/$user/.local \
82+
$HOMEDIR/$user/.composer
83+
done

0 commit comments

Comments
 (0)