Operating System - HP-UX
1824008 Members
4039 Online
109667 Solutions
New Discussion юеВ

simple problem...not able to use mkdir, touch..

 
bhupesh m
Frequent Advisor

simple problem...not able to use mkdir, touch..

hi,
11.00 system. i have only "user" account.
i am trying to copy a simple file from my windows to that machine by using "winSCP"...

its telling that "permission denied", even in my home directory.
in / i am not able to "touch logo_file"
its telling "touch: logo_file cannot create"
$mkdir test_dir
mkdir: cannot access .: Permission denied


mkdir's permission:
-r-xr-xr-x 2 bin bin 20480 Nov 7 1997 mkdir

touch's permission:
-r-xr-xr-x 1 bin bin 20480 Nov 7 1997 touch

ie, read and execute for me.

thanks,...poitns given...

8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: simple problem...not able to use mkdir, touch..

You need to look at the directory permissions for your home directory. It sounds like you have only read access, but not write access.
Steven E. Protter
Exalted Contributor

Re: simple problem...not able to use mkdir, touch..

Shalom,

You are right, this is probably easy.

You don't own your home directory any more.

Log on as root.

ll -d < your home directory>
id

If the two do not match, use root to make them match.

There may be no sync between your windows user and Unix in which case you must use the correct user in winSCP. Don't assume just because you connected you own the homd directory.

Summary:
Don't look at the permission on the command, look at it on the folder you are in.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jonathan Fife
Honored Contributor

Re: simple problem...not able to use mkdir, touch..

The permission errors aren't from the mkdir and touch executables, they're saying that you don't have permission to create files in the directory you're in, which makes sense if you are in the root (/) directory.

When using winSCP are you specifying the destination directory as /home/?

Can you log in, cd to your home directory (or wherever you're scp'ing the file to) and do an ls -ld to make sure you have read/write permissions there?
Decay is inherent in all compounded things. Strive on with diligence
bhupesh m
Frequent Advisor

Re: simple problem...not able to use mkdir, touch..

hostname $ ll -d hpzid
drwxr-xr-x 2 hpzABC users 1024 Apr 21 02:18 hpzid
hostname$ id hpzid
uid=4260(hpzid) gid=20(users)

s. my home directory's owner is another guy.
i dont have root passwd. so without root's help i cant do anything. isnt?
Jonathan Fife
Honored Contributor

Re: simple problem...not able to use mkdir, touch..

You need someone with the permission to change the directory owner or permissions...either hpzABC or root.

Alternatively, if you just want to get the file onto the system *somewhere*, /tmp usually has write permissions for everyone.
Decay is inherent in all compounded things. Strive on with diligence
Peter Nikitka
Honored Contributor

Re: simple problem...not able to use mkdir, touch..

Hi,

Yes, you need a root account to change that.

ask you admin to give you back your home directory.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Torsten.
Acclaimed Contributor

Re: simple problem...not able to use mkdir, touch..

You don't need to be root, but you need to be hpzABC at least.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Peter Nikitka
Honored Contributor

Re: simple problem...not able to use mkdir, touch..

... but only if chown is unrestricted, so 'giving away' files is permitted.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"