set 0770 permissions on NTFS

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
pentySVK
DD-WRT Novice


Joined: 13 Jul 2014
Posts: 39

PostPosted: Thu Nov 19, 2015 20:28    Post subject: set 0770 permissions on NTFS Reply with quote
Hello

I am using ownCloud running on entware /linksys ea6400, wrt merlin/

as data folder I am using NTFS partition, but there is an error:

Data directory (/mnt/usbdrive/owncloud/) is readable for other users

Please change the permissions to 0770 so that the directory cannot be listed by other users.


Is there any way to set permissions to 0770 on NTFS?


Thanks, penty
Sponsor
marteline
DD-WRT Novice


Joined: 22 Dec 2015
Posts: 29

PostPosted: Tue Dec 22, 2015 11:29    Post subject: 770 permissions Reply with quote
Hi, I facing the same problem...

I already try chmod and other commands like this...

I read that for NTFS partition we should mount the drive with the permissions, otherwise it won't work...


in Linux fórum says that I have to:

1- create the mount point:

"mkdir /mnt/ntfs"

2- mount using:

"mount -t ntfs /dev/sda1 /mnt/ntfs"


can someone help me?
marteline
DD-WRT Novice


Joined: 22 Dec 2015
Posts: 29

PostPosted: Sat Dec 26, 2015 3:01    Post subject: Reply with quote
No joy...

First I try to umount the drive:
Code:
umount -f /dev/sda1

response:
can't forcibly umount /tmp/mnt/sda1: Resource busy

So I uncheck the automatic drive mount on usb settings and try to mount:
Code:
mount -t ntfs /dev/sda1 -o "dmask=027,fmask=022" /tmp/mnt/sda1

response:
no such device

what is weird, since if I use:
Code:
fdisk -l

it returns:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 60802 488383488 7 HPFS/NTFS

Also, the device works when I check the auto mount option and apply:

--- /dev/sda1
Block device, size 465.8 GiB (500104691712 bytes)
Windows BOOTMGR boot loader
NTFS file system
UUID 90C4A0E5C4A0CEB2
Volume size 465.8 GiB (500104691200 bytes, 976766975 sectors)
/dev/sda1 mounted to /tmp/mnt/sda1

What should I do?
marteline
DD-WRT Novice


Joined: 22 Dec 2015
Posts: 29

PostPosted: Sat Dec 26, 2015 13:59    Post subject: Reply with quote
Still not working....

I did the mkdir before, same result:
Code:
mkdir -p /tmp/mnt/sda1
mount -t ntfs /dev/sda1 -o "dmask=027,fmask=022" /tmp/mnt/sda1

mount: mounting /dev/sda1 on /tmp/mnt/sda1 failed: No such device
marteline
DD-WRT Novice


Joined: 22 Dec 2015
Posts: 29

PostPosted: Sun Dec 27, 2015 0:15    Post subject: Reply with quote
these commands create the directory in tmp/mnt with the correct permissions but don't associate my storage with this directory...

This issue is really high above my skill... looks like I won't figure out a way to use owncloud im my NAS... Sad
marteline
DD-WRT Novice


Joined: 22 Dec 2015
Posts: 29

PostPosted: Sun Dec 27, 2015 4:07    Post subject: Reply with quote
As long as you keep sending instructions, I will keep trying! Razz

Code:

root@DIR880:~# which ntfs-3g
/usr/sbin/ntfs-3g
root@DIR880:~# mkdir -p /tmp/mnt/sda1
root@DIR880:~# ntfs-3g -o dmask=027,fmask=022 /dev/sda1 /tmp/mnt/sda1
fuse: device not found, try 'modprobe fuse' first


What's next?


Thanks again for all your support!
marteline
DD-WRT Novice


Joined: 22 Dec 2015
Posts: 29

PostPosted: Sun Dec 27, 2015 17:03    Post subject: Reply with quote
I think would be better to use bitorrent sync instead... I read that it is faster than owncloud....
Did you already install it in ddwrt?

I download all versions from getsync.com
when I try to run it says: permission denied to all versions but "BitTorrent-Sync_arm"... for this one it returns:

./btsync not found

I am using
Code:
./btsync
to run...Any ideas?
marteline
DD-WRT Novice


Joined: 22 Dec 2015
Posts: 29

PostPosted: Mon Dec 28, 2015 1:09    Post subject: Reply with quote
Scratch that, I am back to owncloud...

I formated my USB drive in the ext4 file type with gparted and the "permission problem" is over...

Owncloud is runing like a charm.... thanks for your support!
myRooty
DD-WRT Novice


Joined: 13 Mar 2017
Posts: 9

PostPosted: Sun Mar 26, 2017 10:52    Post subject: Reply with quote
hey eibgrad

thanks for keeping on trying and posting all code lines.

I am currently stuck at a similar point: my attached USB partitions being NTFS work fine; apart from not letting me execute .SH files (which I'd need to install Entware.

Ergo, I am doing a massive reading of permission handling etc. while mounting NTFS partitions.



My contribution to your thread here:

during uncountable umounts & mounts (Kong Kernel 4.4.39 b31xxx on Broadcom Asus rt-ac68u) I can confirm

mounting a USB flash (aka USB stick) NTFS partition:
Code:
NO - mount > invalid argument
NO - mount -t ntfs-3g > no such device

YES - ntfs-3g
myRooty
DD-WRT Novice


Joined: 13 Mar 2017
Posts: 9

PostPosted: Sun Mar 26, 2017 11:14    Post subject: Reply with quote
eibgrad wrote:



If it still fails, try mounting it via /etc/fstab by placing the following in the startup script.

Code:
sleep 60
mkdir -p /tmp/mnt/sda1
cp /etc/fstab /tmp/fstab
echo "/dev/sda1 /tmp/mnt/sda1 ntfs guest,dmask=027,fmask=022 0 0" >> /tmp/fstab
mount --bind /tmp/fstab /etc/fstab
mount -a


If that doesn't work, try this instead.

Code:
sleep 60
mkdir -p /tmp/mnt/sda1
cp /etc/fstab /tmp/fstab
echo "UUID=90C4A0E5C4A0CEB2 /tmp/mnt/sda1 ntfs guest,dmask=027,fmask=022 0 0" >> /tmp/fstab
mount --bind /tmp/fstab /etc/fstab
mount -a


I based the UUID on your dump of /dev/sda1.

I threw in “guest” as an example too. Again, any authentication requirements would have to be included.


and

marteline wrote:
these commands create the directory in tmp/mnt with the correct permissions but don't associate my storage with this directory...



Second finding on my above stated quest with above detailed HW and FW on FSTAB and PERMISSIONS (again: as dd-wrt is continuously developed, nota been my type and version of FW):

- fstab (/lib/modules/4.4.39) is READONLY
-- presumably as it carries the /dev/root permissions?
-- if presumption correct > to presume the folder is READONLY too as otherwise with a bind one could easily a) set free all access to your device for anyone and b) (help to) mess up your router Wink ?

Nota bene 2: this presumption comes from working via Mac > Terminal > Telnet > @root on my router.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum