Change umask for nologin user?

Hi,
this is more of a general unix question i guess, but perhaps someone can help me... i have a webserver running, and a PHP script that writes files on the disk. these files are owned by user 'www', and i've set up a new group 'webadmins' which contains only 'www' and my own account, so that when the files are written they belong to this group, and i can access them using my account. however, the umask for 'www' is 0022, which means me, even being in the same group, am not allowed to modify the files/directories. so what i wanted to do was change www's umask so that it allows write access for group members.
but, as you know, www is not allowed to log in, so i dunno how i can change that umask. can anyone help me there? would it help to change /etc/passwd to allow login, change the umask, and then change the shell back to /usr/bin/false?
thx for your help!

thx for the reply!
that's actually a rather good idea, i checked and it's possible with PHP (simply using the 'umask' function... stupid me, didn't check that :-\ ). however, it's still not perfect, for 2 reasons:
- assuming several scripts create files, i'd have to add that to all scripts
- it says in the documentation that one shouldn't use that in a multithreaded environment, cos there might be conflicts with other instances being executed at the same time... using chmod instead would solve that problem, but again, i'd have to do that for all scripts that create files on the server, rather cumbersome...
still it taught me something about PHP

Similar Messages

  • How to change password for a user in WLS 7.0 embedded ldap in code?

    I asked the similar question before but don't have an answer yet.
    I need to change password for a user in my Java code. Any help will be
    appreciated.
    Here is my stack trace:
    c:\Test>java -classpath . testEmbeddedLdap
    attribute: uid
    attribute: description
    attribute: objectclass
    attribute: wlsMemberOf
    attribute: sn
    attribute: cn
    javax.naming.NoPermissionException: [LDAP: error code 50 - Insufficient
    Access Rights]; remaining name
    'uid=myRegularUser,ou=people,ou=myrealm,dc=mydomain'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2872)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2810)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2616)
    at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1374)
    at
    com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDir
    Context.java:255)
    at
    com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(Partial
    CompositeDirContext.java:172)
    at
    com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(Partial
    CompositeDirContext.java:161)
    at
    javax.naming.directory.InitialDirContext.modifyAttributes(InitialDirContext.
    java:146)
    at testEmbeddedLdap.main(testEmbeddedLdap.java:30)
    Here is my testing code:
    <PRE>
    import java.util.*;
    import javax.naming.*;
    import javax.naming.directory.*;
    public class testEmbeddedLdap {
    public static void main(String[] argv) {
    Hashtable env = new Hashtable(11);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://localhost:7001");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, "uid=myAdministrator, ou=people,
    ou=myrealm, dc=mydomain");
    env.put(Context.SECURITY_CREDENTIALS, "myAdministrator");
    try {
    DirContext ctx = new InitialDirContext(env);
    String
    sUser="uid=myRegularUser,ou=people,ou=myrealm,dc=mydomain";
    String sOldPassword="myRegularUser";
    String sNewPassword="newpassword";
    for (NamingEnumeration ae = ctx.getAttributes(sUser).getAll();
    ae.hasMore(); ) {
    Attribute attr = (Attribute)ae.next();
    System.out.println("attribute: " + attr.getID());
    ModificationItem[] mods = new ModificationItem[2];
    Attribute mod0 = new BasicAttribute("userpassword",
    sOldPassword);
    mods[0] = new ModificationItem(DirContext.REMOVE_ATTRIBUTE,
    mod0);
    Attribute mod1 = new BasicAttribute("userpassword",
    sNewPassword);
    mods[1] = new ModificationItem(DirContext.ADD_ATTRIBUTE, mod1);
    ctx.modifyAttributes(sUser, mods);
    ctx.close();
    } catch (NamingException e) {
    e.printStackTrace();
    </PRE>
    "Neil Smithline" <[email protected]> wrote in message
    news:[email protected]...
    Two things. First, I'm not exactly sure what password you are trying to
    change. The LDAP server's password or a user's password in the LDAP
    server. Second, could you please post a stack trace.
    Thanks - Neil
    K Wong wrote:
    I am using (javax.naming.directory.DirContext.modifyAttributes) to
    change
    password to our development Weblogic 7.0 embedded LDAP.
    I login as the system administrator (a user in the administratorsgroup),
    but always gets the javax.naming.NoPermissionException - InsufficientAccess
    Rights.
    What user should I use? Any help will be appreciated.

    Hai,
    This condition based execution requires - javascript coding.
    In miscelleaneous tools bar, you have an option of SCRIPT_ITEM writer tool, drag the tool into your WAD layout, and select the properties , choose the editor option and paste your coding. that's it.
    Alternate option :
    in your web application design layout , you will fine XHTML coding editor , there you need to write coding and execute the same.
    Hope this will help to you.
    Assign Points if its really useful.
    Cheers !!!
    Bye
    Regards,
    Giri

  • Where can I change desktop for anonymous user ?

    Hello.
    Where can I change desktop for anonymous user ? I'd like to change it in the same manner as sampleportal desktop (with amconsole) , but I did not found it in the amconsole.
    If you know, please, tell.

    The user "authlessanonymous" holds the information that people see if they are not signed on. It can be changed like any other user. It may have to be enabled under the Service Configuration tab -> portal desktop.

  • I am unable to change passwords for any users.  The "change password" is grayed out.

    I am unable to change passwords for any users.  The "change password" is grayed out.  I know there is a way to change them but I am having trouble finding it.
    Message was edited by: dmw1975

    If you're in the Users pane of the server app, and you select Network Users from the drop-down near the top, there's a small padlock icon at the bottom. Is it locked or open? If locked, click it and enter credentials into the authorisation box that opens

  • How to change password for sidadm user on HP-UX

    Hello
    How to change password for <sidadm> user on HP-UX

    Hello Jan,
           1.      Log on to the operating system with the <sid>adm user.
           2.      Open a shell.
           3.      Enter the command passwd.
           4.      Enter the old and new passwords
    Rohit

  • How to change password for apple user id

    how to change password for apple user id

    If you can't remember your current password then you should be able to get it reset via this page : http://iforgot.apple.com
    If you know your current password then on your phone you can try tapping on your id in Settings > Store and you might be able to change it on your account's screen, or on your computer's iTunes you can log into your account via the Store > View Account menu option and change it on there

  • How to change password for  XELSYSADM user in OIM?

    Hello Gurus and Experts!
    How to change password for XELSYSADM user in OIM?
    Your help is appreciated.

    Follow the undermentioned steps to change the password:
    1) Change the password from oim Design Client as usual.
    2) Open xlconfig.xml present in <XL_HOME>\xellerate\config folder.
    3) This step is optional and should only be used if you have a <XLPassword encrypted> tag in the <Scheduler> section. In the scheduler section, change the encrypted="true" to encrypted="false" and replace existing encrypted password with new clear text password, as shown below:
    <Scheduler>
    <XLUserName>xelsysadm</XLUserName>
    <XLPassword encrypted="false">NEW_PASSWORD</XLPassword>
    </Scheduler>
    4) Restart server.
    Now login with the new password.

  • Change documents for the user in Ep7.0

    Hi,
    Is there a way can we track change documents for a user in user admin in AS java stack.We have LDAP sun 5.2 version as the datasource.in ABAP stack we have some thing like in suim the change docs.Thanks.

    Hi Ambarish,
    Please check the Security Logging (.../usr/sap/<SID>/j2ee/cluster/serverX/log/security.log) might helps.
    Security audit log - 1278155
    Refer to http://help.sap.com/saphelp_nw70/helpdata/EN/03/37dc4c25e4344db2935f0d502af295/frameset.htm
    Regards
    Arun Jaiswal

  • How to change settings for all users?

    Hi All,
    In cPro we have User Settings button. On clicking that we get a Tabstrip where you will find "User" tab.
    my question is: How can we change the default settings for all users e.g setting the checkbox "Scheduling only manually" to true ?
    Best Regards,
    Arti.

    Hi Arti,
    In cProjects the authorizations can be managed either by authorization profile administration by system administrator for General authorizations or by Project specific authorizations for individual cProjects elements by Project owner.
    Try the first one and I hope you will get the solution.
    Regards,
    Nishit Jani
    Award points only if you find the information useful.

  • How to change preferences for all users in a Citrix enviroment

    Hello.
    I need change some preference settings for all users in my Citrix enviroment.
    I know change the preference settings for a user, of course, but a have 160 users and a need to change some settings configuration one time on the server for all users.
    The preferents I need change are: 'disable javascript' and 'don't show pdf in IE'
    Thanks.

    Hi Arti,
    In cProjects the authorizations can be managed either by authorization profile administration by system administrator for General authorizations or by Project specific authorizations for individual cProjects elements by Project owner.
    Try the first one and I hope you will get the solution.
    Regards,
    Nishit Jani
    Award points only if you find the information useful.

  • MIGO Posting Date - Authorisation to Change/Display for Certain User ID

    Dear all
    There is this business requirement
    1. Warehouse users should not change the Posting Date of the GR refer PO. It is to avoid user from delaying their work to enter into SAP system the next day although they have received the goods today. As such, we should change the field status of POSTING DATE into Display mode.
    2. However, if the warehouse user has forgotten to enter on the GR Date, they have to go to their Warehouse manager to ask him to enter for them, since the field status: Posting Date is set to display.
    Question:
    I know how to set the field status of Posting Date to display, but will this field status will be applied as "display" for all the user id? If so, then how can I control only the Warehouse Manager can have the Change Mode for Posting Date?
    Thanks in advance
    Edited by: Daimos on Oct 14, 2009 8:37 AM

    Hi all
    I found out this can be done by assigning manager and store keeper to different Tcode with different field status:
    Warehouse Manager - MIGO_GR, field status of Posting Date: Required
    Store Keeper - MIGO, field status of Posting DAte: Display Only
    This will solve the problem!

  • Changes done for sap user details

    Hi All,
    I need to know a standard transaction code or FM;
    which can give the information on the modifications/changes done
    for the sap user's first name; last name and e-mail id.
    Any help will be appreciated.
    Thanking you all in advance.

    Hi Kanagaraja,
    I really appreciate you inputs, it will definitely have entries posted by BAPI.
    But the requirement I have is little different.
    I will have some person changing the user information manually,
    I need to go somewhere and find out whether the person has made the
    changes in user's first name, last name or e-mail id.
    So, I am looking out for some FM or table or even standard t-code where
    I could find the changes done, and change log lately.
    Thanks and Best Regards

  • Shortcut to generate change documents for multiple user id access in ecc 6

    hi.
    i need to generate a report with changes to user ids within the last  month. i dont have access to sap notes. thanks

    apart from SUIM, you can also refer to below reports
    RSUSR100                                   Change Documents for Users
    RSUSR100N                                  Change Documents for Users
    RSUSR101                                   Change Documents for Profiles
    RSUSR102                                   Change Documents for Authorizations
    regards,
    Surpreet

  • Acrobat Reader 11 MUI : Impossible to change Language for Final user.

    Hello,
    I need to deploy AdbeReader on several PC.
    On my enterprise, we have several language (english, french, deutch...)
    I have configure MSI package with Adbe Customization Wizard. But on this tool we cannot choose "Set the language to the OS language..." By defaut, I choose English.
    I have read on Adobe Reader document that by default, for MUI, we need to put 1 to this reg key :
    HKLM\SOFTWARE\Adobe\(product)\(version)\Language\UseMUI\
    In my case, it's ok.
    But, when I install Adobe Reader with my mst file, application stay in english (even if I use a french computer).
    And, if I try to change manually the language it does'nt works. Choose at application startup does'nt too. I have never the popup to choose the language.
    Someone can help me ?
    Many thanks !

    Adobe Properties — Enterprise Administration Guide
    Language    11 & later    SUPPRESSLANGSELECTION    MUI installers only. The default of 1 does the following:
    Sets the language to the OS language for all users.
    Disables the language selection dialog on application startup for any user.
    Sets HKLM\SOFTWARE\Adobe\(product)\(version)\Language\UseMUI\bUserMUI to 1
    This is particularly useful for multiuser installations where the language selection dialog would normally appear if a different user logs in, Citrix installations, and so on.
    A value of 0 results in the language selection dialog appearing at first launch for every newly logged in user of the machine. For Acrobat this property is not applicable. When Acrobat is installed with MUL serial number and LANG_LIST=ALL, the launch language would be the same as OS language unless a language transform is also applied.

  • Authenication changed to for OWA user logon. Users can not login

    When visiting our OWA page, users would log-on with their username.
    There was many requests to change it to email address, so I changed the authentication type under Server Config>Client Access>OWA site
    Previously it was set as "user name only" and I changed it to "User Principal Name (UPN)"
    It worked that when you were at the OWA page, it would ask you for your email address...only entering your email address and password did not work.  I could not get it to work for any users.
    My question.  Where is it getting the logon "email address" credentials?  Is it getting it from the users reply to email address?  It does not seem to be...
    Advice would be appreciated.

    Hi,
    Open Active Directory Domains and Trusts.
    Right-click Active Directory Domains and Trusts in the Tree window pane, and then click Properties.
    On the UPN Suffixes tab, type the accepted domain used in your email address.
    Now when you can select the new UPN  suffix from Active directory users and computers->User properties->Account tab. Select the required account details. Now you can be able to login using the email address
    Regards from Visit ExchangeOnline |
    Visit WindowsAdmin

Maybe you are looking for