Tuesday, March 13, 2012

SharePoint ULS logs stop logging after sharing log files directory

I discovered an issue where SharePoint stopped logging to the ULS after I shared the log files directory. 
Upon further investigation I found that once I shared the SharePoint log directory via the "share with" command available when right clicking on a folder/file and then selected a particular user or group that SharePoint stops logging anything to the ULS logs.
I ended up finding that when you share a folder via this method there are accounts that are removed from the security on the logs directory.

The following accounts are what is on the SharePoint logs folder by default

SYSTEM
LOCAL SERVICE
WSS_RESTRICTED_WPG_V4
WSS_ADMIN_WPG
WSS_WPG
Administrators

After you share a directory in this method the following accounts are removed from the folder permissions

LOCAL SERVICE
WSS_RESTRICTED_WPG_V4
WSS_ADMIN_WPG
WSS_WPG

The reason logging breaks is because the SharePoint account that writes your logging info is a member of the WSS groups and when they are removed SharePoint can no longer write to the directory. What i found interesting is that there were no errors logged in the event logs and obviously not the ULS logs.

So to avoid this issue when sharing:
  • Go to advanced sharing on the sharing tab under folder properties and setup the share from there. From my testing the accounts are not removed when shared this way.
 To resolve the issue:
  • Either add the individual accounts back to the folder security or go to central admin, change the logging location to a temporary folder, apply setting, then go back into the setting and change it back to the original location. This will also restore the permissions that were removed.

Monday, March 5, 2012

New property setup in User Profile Service App does not show up in user info on sites

I ran into an issue where, after creating a new property in the user profile service application and running an incremental sync the new property does not  show up in users info when you click on the account in a site and pull up their profile.
If you go to the users profile in UPA the property shows populated correctly.

In our case we were trying to add the Office AD property.

To resolve I performed the following. 

  • stsadm -o sync -listolddatabases 1
  • stsadm -o sync -deleteolddatabases 1
  • Wait until the top of hour or run "User Profile to SharePoint Full Synchronization job"
Check sites again and new property should be present for users