I’m using Plasma DE. Please see screenshot below. After I executed the chmod command with sudo, the permission attributes still remained…could anyone tell me how to do it properly? I’m only able to read the files under the network share. How do I add the “write” permission?
I made an entry under /etc/fstab (see below). I don’t know if this interfere with the chmod command. //192.168.1.12/PiShare /mnt/pi4gshare cifs credentials=/home/apache/Documents/.pi4gshare_cred,iocharset=utf8 0 0
You can’t use chmod/chown on files or directories mounted via cifs. It doesn’t support POSIX permissions.
You can control that with mount options. Try adding user to the list of mount options.
Also, in that situation, you don’t chmod, the issue is ownership.
Lastly, never chown -R 777, that isn’t the right way to assign permissions. That is often irreversible and can cause serious problems. chmod 777 isn’t how you get permissions to things.
Thank you. It works now. Just curious, why can I still execute the files in that share folder even I didn’t add the “x” after “rw” at this entry? Thanks again.
If you do an ls -l inside the directory, you will probably see that everything is rwxrwxrwx. Those are usually the default permissions if you don’t specify a fmask and dmask in the options.
I put an Openshot.appimage in that network share but unable to execute it. should I append “x” after “rw”? However, it doesn’t seem like a permission issue, I placed that appimage under /home but unable to execute, either. Do I need an appimage launcher for KDE Plasma?
after I removed the “rw,uid,gid” and add the fmask and dmask, the permission and ownership did change, see below:
Personally, I would not recommend running an appimage(or anything else) from CIFS share. However, to see what it wrong we would need to see an ls -l of the appimage.
That isn’t what that does. It just controls if the volume is mounted read/write or read-only. It isn’t about file permissions.
After you copy it to /home you probably need to make it executable.
No.
Why did you remove uid and gid? uid and gid control ownership and fmask and dmask control permissions. They work together.
I am not sure what you are trying to accomplish, but generally speaking you are best served to use a CIFS share for data storage and not have it be executable at all. Usually you would set something like dmask=0022 and fmask=0133.
I was trying to figure out what each option in the entry does, but enough for now.
The problem I have now is that there was nothing happened when I ran them under my home folder, even the permission is 777 and marked executable…so weird…it works fine on my other machine with Mint. Can you help?
Can you point me a place I can learn each option in the entry of the /etc/fstab? I’m glad it works now but I haven’t figure out what’s really going on behind it…such as permission, uid, gid, fmask and dmask…how they cooperate/interact/restrict each other? I think having a solid understanding on these is very crucial in the long run. Thanks again for your patience!
The options vary by filesystem type. The list of the options and what they do can be found in the man page. Here is an html version: https://linux.die.net/man/8/mount.cifs
In general, filesystems that don’t support POSIX permissions use mount options to fake them. You will similiar things in exfat/vfat/ntfs/etc. However, POSIX filesystems like ext4/btrfs/xfs/etc don’t need those options.