我已经使用最新的Mojave在Mac中启用了root用户。我试图用它删除一个文件夹,但是由于某种原因,我得到了错误“权限被拒绝”。我以为root在Unix系统上可以做任何事情?
sh-3.2# whoami
root
sh-3.2# pwd
/opt/local/var/macports/home/Library
sh-3.2# ls -lhart
total 0
drwxr-xr-x 3 root admin 96B Sep 24 2016 ..
drwxr-xr-x 3 root admin 96B Sep 24 2016 .
drwxr-xr-x 2 root admin 64B Oct 13 18:54 Preferences
sh-3.2# rm -rf Preferences/
rm: Preferences/: Operation not permitted
sh-3.2# whoami
root
sh-3.2#
答案 0 :(得分:2)
似乎,SIP如上所述保护/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasColumn('empresa', 'nr_telefone2')) {
Schema::table('empresa', function (Blueprint $table) {
$table->integer('nr_telefone2')->unsigned()->nullable()->after('nr_telefone');
});
}
if(!Schema::hasColumn('empresa', 'nr_telefone3')) {
Schema::table('empresa', function (Blueprint $table) {
$table->integer('nr_telefone3')->unsigned()->nullable()->after('nr_telefone2');
});
}
if(!Schema::hasColumn('empresa', 'redes_sociais')) {
Schema::table('empresa', function (Blueprint $table) {
$table->text('redes_sociais')->nullable()->after('vl_ultima_rps');
});
}
if(!Schema::hasColumn('empresa', 'logo')) {
Schema::table('empresa', function (Blueprint $table) {
$table->char('logo' , 200)->nullable()->after('nm_fantasia');
});
}
if(!Schema::hasColumn('instituicao', 'tp_empresa')) {
Schema::table('instituicao', function (Blueprint $table) {
$table->char('tp_empresa', 1)->nullable();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
文件夹。
请按照以下步骤删除这些文件夹:
不必停用SIP。