Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a window machine connecting (via samba) to my linux box to create a directory.
From windows, I call mkpath "z:/temp", 0777 inside a perl code.
where z: = /home/user1 is the shared linux drive.
On Linux (redhat), the temp direct created under /home/user1/ has following permission:
drwxr-xr-x 2 user1 user1 4096 May 1 16:15 temp
I want to create a directory with 777 permission, but it didn't work.
In linux, i even call umask to set the permission on the directory: [user1@comp]$ umask 777
Does anyone know the trick to make the permission to be 777 when creating a directory
You may be stuck because of the hierarchical directory permissions on Windows, which I don't think Perl can change directly.
It's possible, though, that if you change your umask to "0", rather than "777" that it might help. 777 imposes total restriction (on Unix/Linux it would make your files/dir permissions 000) and 0 doesn't impose any. That's one reason I think the problem might need to be fixed on the windows end.
If that is the case, check out cpan(dot)org or check if active state perl has any modules to help out with setting ACL's on windows through Perl.
Change the command to $umask 000 , but still does not work. I still get the same dir permission once it created by mkpath. Not sure yet how to fix in windows.
If it's a samba thing, check out "swat" and when you have that up and running choose to show all options. There a ton of them. Perhaps it's in there. Of course, check without showing all options first, because the smb.conf has a ton of them
It still have problem.. This problem cause me a lot of pain, that i have to
go to the directory ee and do the chmod -r 777 * every time a new dir under subdirecotry of b1 is created by apache user or mkpath 0777 cmd, say ./b1/john/temp1
Below is my samba setting. Can anyone help me please?
It still have problem.. This problem cause me a lot of pain, that i have to
go to the directory ee and do the chmod -r 777 * every time a new dir under subdirecotry of b1 is created by apache user or mkpath 0777 cmd, say ./b1/john/temp1
Below is my samba setting. Can anyone help me please?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.