4.25 作业

2024-04-26 23:36
文章标签 作业 4.25

本文主要是介绍4.25 作业,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

#1、创建g1组,要求创建一个属于redhat用户g1组的文件redhat.txt


[root@localhost ~]# groupadd g1
[root@localhost ~]# touch /root/redhat.txt
[root@localhost ~]# ll /root/redhat.txt
-rw-r--r--. 1 root root 0  4月 26 20:19 /root/redhat.txt
[root@localhost ~]# chown xnj1 redhat.txt
[root@localhost ~]# chgrp g1 redhat.txt
[root@localhost ~]# ll /root/redhat.txt
-rw-r--r--. 1 xnj1 g1 0  4月 26 20:19 /root/redhat.txt

#2、新建/sc目录,所属组为group组,root用户和group组用户可在该目录下创建文件,其他人无任何权限

[root@localhost ~]# groupadd group

[root@localhost ~]# mkdir /sc
[root@localhost ~]# ll -d /sc
drwxr-xr-x. 2 root root 6  4月 26 20:34 /sc
[root@localhost ~]# chmod o-rw /sc
[root@localhost ~]# ll -d /sc
drwxr-x--x. 2 root root 6  4月 26 20:34 /sc
[root@localhost ~]# chmod o-x /sc
[root@localhost ~]# ll -d /sc
drwxr-x---. 2 root root 6  4月 26 20:34 /sc
[root@localhost ~]# chmod g+w /sc
[root@localhost ~]# ll -d /sc
drwxrwx---. 2 root root 6  4月 26 20:34 /sc

#3、新建/cw目录为财务部存储目录,只能对财务部人员可以写入,并且财务部人员所建立的文件都自动属于mygroup组中

[root@localhost ~]# mkdir /cw
[root@localhost ~]# groupadd mygroup
[root@localhost ~]# chgrp mygroup /cw
[root@localhost ~]# ll -d /cw
drwxr-xr-x. 2 root mygroup 6  4月 26 20:37 /cw
[root@localhost ~]# chmod o-rx /cw
[root@localhost ~]# chmod g+w /cw
[root@localhost ~]# ll -d /cw
drwxrwx---. 2 root mygroup 6  4月 26 20:37 /cw

#4、设置helen用户对于/sc和/cw目录可读、可写、可执行

[root@localhost ~]# useradd helen

[root@localhost ~]# chmod 777 /sc
[root@localhost ~]# chmod 777 /cw

#5、设置/test目录为公共存储目录,对所有用户可以读、写、执行,但用户只能删除属于自己的文件。

[root@localhost ~]# mkdir /test

[root@localhost ~]# chmod 777 /test

[root@localhost ~]# chmod o+t /test

[root@localhost ~]# ll -d /test
drwxrwxrwt. 2 root root 6  4月 26 20:53 /test

#6、在/test/dir里创建的新文件自动属于temp组

[root@localhost ~]# mkdir /test/dir

[root@localhost ~]# groupadd temp
[root@localhost ~]# ll -d /test/dir
drwxr-xr-x. 2 root root 6  4月 26 20:58 /test/dir
[root@localhost ~]# chgrp temp /test/dir
[root@localhost ~]# chmod g+s /test/dir
[root@localhost ~]# chmod g+w /test/dir
[root@localhost ~]# chmod o+w /test/dir
 

这篇关于4.25 作业的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/938967

相关文章

作业提交过程之HDFSMapReduce

作业提交全过程详解 (1)作业提交 第1步:Client调用job.waitForCompletion方法,向整个集群提交MapReduce作业。 第2步:Client向RM申请一个作业id。 第3步:RM给Client返回该job资源的提交路径和作业id。 第4步:Client提交jar包、切片信息和配置文件到指定的资源提交路径。 第5步:Client提交完资源后,向RM申请运行MrAp

Java高级Day38-网络编程作业

112.网络编程作业 //1.使用字符流的方式,编写一个客户端程序和服务器端程序//2.客户端发送"name",服务器端接收到后,返回"我是nova"//3.客户端发送"hobby",服务器端接收到后,返回"编写java程序"//4.不是这两个问题,回复"你说啥呢"​​===============//客户端//===============public class SocketT

0906作业+思维导图梳理

一、作业: 1、创捷一个类似于qq登录的界面 1)源代码 #include "widget.h"#include "ui_widget.h"Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget){ui->setupUi(this);//QPushbutton:登录、退出this->join = new QP

2024.9.6 作业

1> 手写unique_ptr指针指针 #include <iostream>using namespace std;template <typename T>class my_unique_ptr{public:explicit my_unique_ptr(T *p = nullptr) noexcept // 构造函数{ptr = p;}~my_unique_ptr() noexcep

9月6号作业

1:.h文件 #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QWidget> #include<QIcon> //图标类 #include<QLabel> //标签类 #include<QMovie> //动图类 #include<QLineEdit> //行编辑器类

Flink实例(六十九): flink 作业提交(四)总结

独立集群提交 # 启动集群bin/start-cluster.sh# 提交job./bin/flink run ./examples/batch/WordCount.jar --input hdfs:/user/yuan/input/wc.count --output hdfs:/user/yuan/swwwttt yarn session # 启动集群./bin/

【#第三期实战营闯关作业 ## 茴香豆:企业级知识库问答工具】

今天学习了《 茴香豆:企业级知识库问答工具》这一课,对大模型的应用有了更深得认识。以下是记录本课实操过程及截图: 搭建茴香豆虚拟环境: 输入以下命令 ``studio-conda -o internlm-base -t huixiangdou 成功安装虚拟环境截图 安装茴香豆 cd /root 克隆代码仓库 git clone https://github.com/internlm/h

Quartz 作业调度器

1、Quartz  java实现  注:这里使用的是Quartz1.6.5版本(包:quartz-1.6.5.jar)   [java]  view plain copy //测试main函数   //QuartzTest.java   package quartzPackage;         import java.text.SimpleDateFormat

清华MEM作业-利用管理运筹学的分析工具slover求解最优解的实现 及 通过使用文件或者套节字来识别进程的fuser命令

一、清华MEM作业-利用管理运筹学的分析工具slover求解最优解的实现         最近又接触了一些线性求解的问题,以前主要都是在高中数学里接触到,都是使用笔算,最后通过一些函数式得出最小或者最大值,最近的研究生学业上接触到了一个Excel solver分析工具,对这种线性求最优解的问题感觉使用起来真是得心应手。在使用这个工具前,EXCEL里需要先装上solver工具,装起来很也简单,网上

opencv作业

作业下载地址: 链接:http://pan.baidu.com/s/1qYQnbkw 密码:v7y9