So I have problem with upload/creating files on “external storage” which is mount point.
Environment is Windows 10 host, running Virtual Box with Nextcloud VM,
Fstab entry →
//192.168.88.90/2tbraid1 /mnt/windowsshares/2TBR1 cifs credentials=/home/ncadmin/.smbcredentials,uid=ncadmin,gid=112 0 0
which has the right creds as its mounted and writable from CLI/SFTP(ubuntu)
//192.168.88.90/2tbraid1 1.9T 38G 1.8T 3% /mnt/windowsshares/2TBR1
ls -lh -/mnt/windowsshares/ →
drwxr-xr-x 2 ncadmin uuidd 4.0K Apr 26 15:39 2TBR1
mkdir -u with www-data gives me the following
sudo -u www-data mkdir /mnt/windowsshares/2TBR1/test-www mkdir: cannot create directory ‘/mnt/windowsshares/2TBR1/test-www’: Permission denied
error “Could not not create…”
any idea :S?
Hi, since you are using the Nextcloud VM, you can easily mount SMB shares into your Nextcloud by running the smbmount script:
sudo bash /var/scripts/menu.sh → choose Additional Apps → SMB-mount.
Then you don’t have to deal with any mounting details
I don’t have that script xD
mind posting it here?
ncadmin@nextcloud:~$ ls -lh /var/scripts/ total 52K -rwxr-xr-x 1 root root 47K Dec 13 21:36 lib.sh -rwxr-xr-x 1 root root 775 Dec 13 21:36 welcome.sh
So in this case you most likely installed the basic Nextcloud VM.
The full-fletched one is downloadable here: Nextcloud VM – T&M Hansson IT AB.
I’d recommend to start over with this one because it features many great additions.
If that isn’t possible for you, you can find the script here: vm/smbmount.sh at master · nextcloud/vm · GitHub
It should theoretically work in the basic Nextcloud VM, too.
There’s different versions?
Well that doesn’t complicate things at all ;/…
Thanks though grabbing
tried to use just the script, errored out, just going to load a new vm with link, will post back once it functioning.
It wasn’t a decision that was made easily.
so i was able to use menu.sh to add mounted smb shares…etc but some folders inside those directories are inaccessible
ls: reading directory '.': Permission denied
drwxrwx--- 2 www-data www-data 0 Oct 11 2019 HM2Share
and some are completely empty even though there are files in there
Hm… I’ve never seen this issue. Did you check if the ACL on the Windows server are set correctly? Maybe you could reboot your VM once and try again?
so this is windows ACL in one of the directories;
all the same for the rest
This looks good, afaics. What about the reboot of the VM? Would also be interesting what the following commands return:
sudo mountpoint /mnt/smbshares/3
sudo grep /mnt/smbshares/3 /etc/fstab
so it is an ACL issue but seems windows doesn’t care to propagate the set permissions to the folders…so just added the user to the admin group in windows and i can access the files now…
i know its no ideal but i hate to leave it like this…
reboot did nothing,
/mnt/smbshares/3 is a mountpoint
//192.168.88.90/HomeMedia2 /mnt/smbshares/3 cifs credentials=/root/.smbcredentials/SMB3,uid=www-data,gid=www-data,file_mode=0770,dir_mode=0770,nounix,noserverino,cache=none,nofail 0 0
Okay, so since you found out that it is an ACL issue, you need to propagate them into all subdirectories. This should definitely be possible.
I hope you can German.
Here is a screenshot of the flag that you most likely need to set to propagate the permissions down into all subfolders:
yeah i can manage, still nothing ;_; might not be ACL related as some of the dirs are still empty …
going to try remount them
ciao charun-za, ho lo stesso problema, alcune cartelle risultano vuote, speravo di sapere come hai risolto