Shell script run
Hi!
I'm really new in Linux, so forgive me if I ask a very simple question.. I've created a Shell script (for my minecraft server to start) and when I ran it for the first time, I did it in '/home/david/craftbukkit/' and now I want to place it somewhere else. I think I did something wrong, but now the linux doesn't asks me to run in terminal or just display the code, now it displays the text in TextEditor. I'm using linux with GUI (ZorinOS - Ubuntu) and an other interesting thing is that whenever I want to edit the permissions it doesn't allows it neither the perms nor the execution as a program.. So my question is how to revert this thing, how could I place a shortcut on the desktop for it and why doesn't it allows me to edit the perms..? Thank you in advance! |
@ Reply
Hi szdavid24,
Welcome to LQ!!! Questions for you: 1. What are the permissions that are currently set on that file? 2. Which command are you using to change permission? 3. What error message do you get when you try to change the permission? |
Quote:
Perms:
I don't use any command, as I meantioned above, I have a GUI for this, mostly everything is accessible by that. So I just right click->properties->Permissions->And do what I want.. Thanks for your help |
@ Reply
Strange! Did you try copying this file to some other location and then edit the file permissions. Did you set any attribute on this file exclusively?
Who is showing up as owner of that file? |
Is the script on a file system mounted with the noexec option?
|
T3RM1NVT0R: Yes of course I tried.. The owner is 'david' and that's my account name.. These were the first things I've checked..
catkin: WHAT?! I'm sorry but as I said i'm new in this.. please describe it to me Thx for your fast answers! |
From the mount man page, in the FILESYSTEM INDEPENDENT MOUNT OPTIONS sections: "noexec Do not allow direct execution of any binaries on the mounted filesystem".
It says "binaries" but applies to shell scripts too (I just confirmed by experiment) but netsearching suggests this behaviour was new in the past 2-3 years (?). Sometimes the noexec option is implicit so the best way to find if it is in use is cat /proc/mounts |
Quote:
Code:
chmod u+x <script> |
Quote:
|
@ Reply
@ szdavid24,
There is something goofy and it does appear to be random. Did you reboot the system and then try to set execute permission? I have tried with different scenarios but as long as I am the owner of that file I was able to change permissions. I tried setting immutable attribute on the file but if that was the case with you then you should have got a permission denied message. @ catkin Quote:
|
Quote:
Quote:
|
Thx guyz!
I found the solution for the problem! The problem was that I wanted to edit the perms on a drive which has been used by Windows and had NTFS file system.. And that's why it's worked on the Linux's drive! Thanks a lot for your help! ps.: @Catkin: I still don't know what are you talking about xD I'm sorry, but I hope that I'll be better in programming in Linux.. |
All times are GMT -5. The time now is 10:34 AM. |