Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the problem of insufficient permissions when linux executes shell scripts

Shulou Source: shulou.com Published: 2022-06-03 02:37:27 09月26日 Update

Problem description:

Today, when I tried to build the working environment of dynamips in Linux, I encountered a small problem when executing the shell script. There is a script file named start.sh, which contains the following contents:

#! / bin/bash./dynamips.bin-H 7200 &

After the terminal executes the shell script, the problem is as follows:

[root] #. / start.shbash:. / start.sh: insufficient permissions

Solution:

Use the chmod command to grant permissions to the shell script before executing the command:

[root] # chmod 777. / start.sh [root] #. / start.sh

Shell is actually a command interpreter that interprets commands entered by the user and sends them to the kernel. Not only that, Shell has its own programming language for editing commands, which allows users to write programs made up of shell commands. Shell programming language has many characteristics of common programming language, for example, it also has loop structure and branch control structure. Shell programs written in this programming language have the same effect as other applications.

Linux provides a visual command input interface like MicrosoftWindows-the graphical user interface (GUI) of X Window. It provides a lot of desktop environment systems, which operate like Windows, with windows, icons and menus, all of which are controlled by the mouse. GNOME .

Users of each Linux system can have their own user interface or Shell to meet their own specialized Shell needs.

These are the details of insufficient permissions when linux terminals execute shell scripts. Please pay attention to other related articles for more information.

Tags: Commands scripts users programming languages languages programming permissions questions interfaces programs content environment user interfaces systems terminals structures controls interpretations inputs general Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Redmi NVidia Linux Shulou Technology