이미 같은 이름의 그룹에 있는데 사용자를 전환하는 이유는 무엇입니까? (Why to switch user when I am already in the group with the same name?)


문제 설명

이미 같은 이름의 그룹에 있는데 사용자를 전환하는 이유는 무엇입니까? (Why to switch user when I am already in the group with the same name?)

우분투 리눅스 서버에서: /home/abc/data/에 액세스할 때 권한 오류가 발생했습니다. abc 그룹에 추가해야 한다고 들었습니다. 그들은 나를 추가했습니다. 해당 디렉토리로 cd할 때 여전히 동일한 권한 오류가 발생합니다. 그런 다음 해당 디렉토리에 액세스하려면 abc 사용자로 전환하려면 sudo su ‑ abc를 수행해야 한다고 말했습니다. 이미 abc 그룹에 있는데 왜 abc로 su를 해야 합니까? abc는 그룹이 아니라 사용자인가요? 혼란스럽습니다.


참조 솔루션

방법 1:

abc might be a user, or a group, or both ‑‑ which depends on how your system is set up, but generally on Ubuntu, every user has a corresponding group with the same name. So it is probably both a user and a group.

Accessing the directory in question might be a question of either user or group permissions. Try doing ls ‑ld /home/abc, which will show you the permissions on that directory. It will give you an output something like

drwxr‑xr‑x 248 abc   abc   16384 Feb 24 09:17 /home/abc

The letters at the beginning are the permissions. In this case the first rwx are the 'user' permissions (meaning the user abc has read, write, and execute permission here) while the second r‑x are the 'group' permissions, (meaning group abc has read and execute permissions, but not write permissions).

If the group permissions are adequate for what you want to do, you need only be in group abc. If on the other hand, you need something only allowed by the user permissions, you need to be user abc. The latter is generally considered bad form and a mis‑configuration.

To see what groups you are a member of, use the groups command.

(by topcan5Chris Dodd)

참조 문서

  1. Why to switch user when I am already in the group with the same name? (CC BY‑SA 2.5/3.0/4.0)

#ubuntu #linux






관련 질문

우분투 서버에서 'hostoadeL' 명령이란 무엇입니까? -- 99% cpu에서 실행 (What is 'hostoadeL' command on ubuntu server? -- running at 99%cpu)

VSFTP 연결 오류 (VSFTP Error Connecting)

Semget 및 fork(): 해당 파일이나 디렉토리가 없습니다. (Semget and fork(): no such file or directory)

/usr/bin/ld에서 -l<nameOfLibrary>를 찾을 수 없습니다. (/usr/bin/ld cannot find -l<nameOfLibrary>)

matlab SVM은 NaN을 반환합니다. (matlab SVM returns NaN)

요청을 설치할 때 pip 오류를 수정하는 방법 (How to fix pip error when installing requests)

메모리 부족으로 인해 루핑 프로그램이 멈춤 (Looping program freezes due to memory running out)

AWS EC2 Ubuntu 19. 여러 tinyproxy 서버 설정 (AWS EC2 Ubuntu 19. Setting up multiple tinyproxy servers)

우분투 터미널에서 "head"를 사용하여 매뉴얼의 처음 10줄을 보는 방법 (How to use "head" in ubuntu terminal to see first 10 lines of manual)

DB2 - C 내장 SQL이 행을 삽입하지 않습니다. (DB2 - C embedded SQL won't insert a row)

Linux C++ GUI 앱을 만드는 방법 (How to make Linux C++ GUI apps)

이미 같은 이름의 그룹에 있는데 사용자를 전환하는 이유는 무엇입니까? (Why to switch user when I am already in the group with the same name?)







코멘트