#[SOLVED BY MY BABYBOY] How do i own the directory that my disk is mounted on
75 messages · Page 1 of 1 (latest)
It looks like a VFAT system, which does not support unix permission.
that means ?
Means that you will have to specific the uid in the mount options
The same applies to file permissions, which are also set using umask.
so what should i do
Isn't that obvious?
okay i wil specific the uid thanks for the help
sudo mount -t vfat /dev/sdc1 /path/to/mount/point -o rw,uid=$(id -u),gid=$(id -g)
Please modify as appropriate
is there anyway i can run this command without sudo
i think it worked let me check
how can i run this on start up
Mounting is a privilege
Do you use a deamon like udisks?
yes
but when i use udisk it doesnt let me exec c++ code
and i have to use mount
You can then use either fstab or udisks configuration.
do you think its unsafe if i put my password on a variable and run echo $PASS | mount ...
The configuration of udisks on Arch is documented at https://wiki.archlinux.org/title/Udisks.
Where would you specify the variable then? it's turtles all the way down.
Firstly, mount does not accept password as a parameter
second, you need to be root to mount
If you wish to mount by proxy without sudo, use a proper authentication framework like polkit
does it take long to set up
will probably take much less time than fiddling with non-standard, potentially insecure scripts.
how do i use polkit
What is your ultimate goal?
Where?
Then fstab should be optimal for this task
UUID=920D-F401 /home/zketra/mnt/main vfat rw,noatime,fmask=0033,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro,uid=1000,gid=1000 0 2
where do i write this
Append to /etc/fstab
ach so
Before you do anything, please read this page carefully to avoid potential catastrophe: https://wiki.archlinux.org/title/Fstab
Pardon my lack of courtesy, that's ridiculous.
i havent changed anything
only added what you sent me
Unix uses 0xA for a newline character. Windows uses a combination of two characters: 0xD 0xA. 0xD is the carriage return character. ^M happens to be the way vim displays 0xD (0x0D = 13, M is the 13th letter in the English alphabet).
so should i add it or not
NO
You can save the file and execute the following command to test
sudo systemctl daemon-reload
sudo mount /dev/sdc1
However, you must first unmount any existing mount points from /dev/sdc1.
Or the mount options won't apply
alr it worksss
does it run everytime i open the pc
or do i have to mount it every time
Mounting entris on fstab is automatic.
so it mounts everytime i open my pc
Yes.
I see you're a C++ fellow as well, I happened to come across this question, which is why std::enable_if_t<std::is_function<F>::value, bool> = true doesn't work with lambda.
Do you happened to know an answer?
lemme see
doesnt lambda return the both answer at same time like v
i mean the and conditions
what is at the other end
Ah, have a look at this neuralyser device.
Have a nice day.