I have got some more partitions other than root and my home directory. When I checked the owner of /home/my_username it was “my_username” but for other partitions where I keep my projects and documents the owner is “root”. I tried changing owner using super user mode in dolphin but it said I do not have permission. Same when I tried changing owner using “chown my_user_name:users /directory” after logging in as super user…
The problem is even after having full permisssion on scripts I have created I am not able to execute them from the directories owned by root.
Basically, you cannot and you should not as this is part of the Unix security system. You can run a script that only affects your own files as user.
If you want to run a script that affects system files, you have to run it as root; you don’t need to change the ownership of anything to do that; simply ensure that root runs the script.
N.B. Even then, there are a few things which you won’t be allowed to do for your own safety.
I am not executing scripts effecting system. It is just that I have a partition called “Projects” where I have all the shell scripts or C programs. They are just for learning purpose and I think I should have permission to execute scripts which do not effect anything. I can understand if Unix does not allow me to change system files but not allowing even a script having an echo command is somewhat different. I should access to that
It sounds to me as if you have been confused by the Windows way of working. In Linux you do not set up separate partitions as if they are disk drives; you add partitions to your system and tell your system about their existence.
Normally, Linux then uses the space as it sees fit. If you want to reserve a partition in the way you might reserve a disk drive in Windows to use with your own files, you have to mount it as a folder within /home. Then it will inherit all the permissions in your /home folder.
I suspect you have mounted it in the normal way causing it to inherit all the permissions of root rather than of /home.