You are running
su safi_test4 but you should be running
Your prompt quite strongly suggests that you started out as the same user you became with
- Although it can be set up otherwise, usually when a shell prompt starts with text followed by a
@ character, the text it shows before that character is the name of the current user.
- When a prompt ends in a
:, followed by some text, followed by a
$, that text between the
: and the
$ usually represents the current directory. Furthermore, a directory named
/home/safi is very likely the home directory of a user named
This is to say that you appear to have used the
cd command to enter the home directory of
safi, but then you used a
su command that did not change your identity to
Assuming the usual permissions are set,
safi_test4 will not be able to create files in the home directory of
safi. Furthermore, it's unlikely you intended to use
su to take on the identity that you already had.
su to take on the identity of another user, you should pass the name of the user you want to become as the argument to
su, not the name of the user you currently are:
Though you might consider using this command instead, which will run a login shell as
su - safi
When you do that, you get an environment like what you would get if you had logged in as
safi by other means (like on a virtual console or via SSH). This has the additional minor benefit that you don't have to separately
safi's home directory.
Note that when you use
su you must enter the target user's password. That is, for
su safi to succeed you must enter
safi's password, not
safi_test4's password (unless they happen to be the same).