Score:0

Permission and unable to copy

cn flag

This must be a really simple question but I cannot wrap my head about it I have two directories each with one directory

$ ls -l
drwxrwsrwx 5 john_smith            ppp 4096  8月 20 12:53 problem_dir
drwxrwsrwx 5 sam_eagle             ppp 4096  8月 17 21:11 no_problem_dir




$ ls * -l
   problem_dir
   drwxr-sr-x 29 john_smith ppp        4096  7月 21 11:42 the_folder

   no_problem_dir
   drwxr-sr-x 15 kansai_robot              ppp        4096  7月 26 17:24 the_folder
   

now, I am not john smith or sam eagle, so when I do

cp a_file no_problem_dir/the_folder/000

I got the file in the folder without problems but when I do

   cp a_file problem_dir/the_folder/000

I got

cp: cannot create regular file ‘the_folder/000/a_file’: Permission denied

I know the reason and about permissions. So I have two problems.

  • I don't know what the permission "s" stands for (only know r,w,x)
  • More importantly how can I copy the file to the folder the_folder?

I tried chmod but to no avail and I don't know the root password

EDIT: I can create a new directory inside both folders

Nmath avatar
ng flag
Usernames cannot contain spaces and Ubuntu does not have a root password. Are you actually using Ubuntu? If you do not own the device and/or your user is not in sudoers, you should contact the system administrator if you do not have proper permissions to do something you want to do. We cannot give you permission to something you don't have permission to do.
cn flag
the username space was a typo. Corrected.
cn flag
My question is what to do in this case? Is contacting john smith and asking him something (what??) the only way I can copy things to the directory? (which incidentally is something john smith has **asked me** to do)
Nmath avatar
ng flag
If that is the person who is the administrator, then yes, you should contact them and ask them for whatever access/permissions you need. Tell them what you are trying to tell us, that you don't have permission to do what you need.
cn flag
I know the permissions are Owner, Group and others. Right now the problematic folder has permissions `drwxr-sr-x` which means RWX for the owner , R (and S?? what is S??) for the group and RX for others. I guess I should ask for W permission for group and others?
cn flag
see `man ls`. When a directory has **setuid** (or setgid) permissions, any files created in that directory will be owned by the user (or group) matching the owner (or group) of the directory. Your 2nd `cp` requires `sudo`. I would suggest to remove the `s` it is not needed for normal user operations.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.